I have asked this question because you have said insurance is haram. A person may lose money or he may get back some money. It is basically the same thing with shares.
By shares, one is investing as a partner in a business venture. This is not the case in gambling and insurance.
In gambling you are merely paying for a right to receive a certain fixed amount, depending on the occurrence of an uncertain event. The two are completely different and shares cannot be compared with gambling.
and Allah Ta’ala Knows Best
Mufti Ebrahim Desai
FATWA DEPT.