When the price of shares of a company increase in the market there is no direct and immediate benefit to the company. The company has already issued the share at a particular price, which may be at a premium or discount or at face value and has already received the consideration and therefore it does not matter to the company wether the shares are trading at a higher price.
However, in the long run, the company is benefited indirectly as it is able to raise fresh equity in future, as and when the need arises. If the shares are trading at a discount to the issue price, obviously investors may be hesitant in investing in the shares of the company.
In conclusion the company is unaffected by price movements in the market of its shares but if the shares are traded at good prices it will be benefitted indirectly by way of enhanced ability to issue fresh shares in future.