All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His Slave and Messenger.
If the conditions and requirements set by the Sharee‘ah are observed in that Initial Public Offering (IPO), then there is no harm in it. There are two requirements for deeming trading shares lawful, be it IPO shares or any other ones:
First, the activities of the company must be lawful.
Second, the money, or any part of it, must not be deposited in Riba-based banks to be invested so that the interest is paid to the shareholders; this consists in depositing money for interest, which is forbidden, regardless of whether the person deposited it himself or the company for which he owns shares did it.
Please refer to Fataawa 257350 and 1241.
Allaah Knows best.