It is a clause that prevents the parties from competing with the company. The clause must be limited: it must specify the excluded activities, the period of time during which they are excluded and the geographical territory in which the clause applies.
This clause may apply for as long as the shareholder is a shareholder of the company, but also for a certain period of time beyond that period, provided that this period is reasonable.