A shareholder agreement is a legally binding document that outlines the rights, responsibilities, and obligations of shareholders in a company. It is crucial in the context of entrepreneurship as it helps prevent disputes and ensures smooth operations. It details how the company will be managed and how important decisions will be made.