A shareholders' agreement is an agreement entered into between all or some of the shareholders in a company. It regulates the relationship between the shareholders, the management of the company, ownership of the shares and the protection of the shareholders. They also govern the way in which the company is run.
‌A contract is an agreement, but an agreement is not always a contract. An agreement can be informal or it may be written; a contract may be verbal or written, but a contract will always be enforceable if it contains certain requirements.