What is a shareholder agreement?

A shareholder agreement is a formal legal contract entered into by a company's shareholders, setting out their respective rights, duties, and obligations, as well as provisions governing the management and operation of the company.