If you are starting a company with others, you will presumably have more than one shareholders. It is prudent – and therefore usual – to have a shareholder agreement to govern such matters as how each shareholder is to behave, and what happens if a shareholder misbehaves and how to exit by way of sale of the shares or otherwise. If there is company/trust arrangement rather than a standalone trading company used as the main vehicle, a unitholders deed will be used instead of a shareholder agreement. These arrangements can be put in place at any time but are best done at the start.
The above is to be distinguished from a partnership. In a partnership, there will be as least two parties that come together as business partners. The partners may be individuals, which is the most common, but may also be corporate partners. Many partnerships, especially smaller two party partnerships overlook the need for a partnership agreement. We see many partnership disputes that arise simply to due to there be no agreement in place. It is wise to put a partnership agreement in place, even if the you have been trading for a while.