Please contribute generously in order to ensure the continuity of our website InshaAllah.
Praise be to Allah.
If he is able to return the shares to the company and take his money, he should do that, because the transaction was invalid, and he should get rid of any money that is more than he paid for them originally.
If he is not able to do that, then some scholars have issued fatwas stating that it is permissible to sell them on the stock market, and to get rid of any extra money so that one will no longer be a partner in the work of this haraam company.