Shariah-compliant investments must meet all the requirements of Shariah law, as well as other principles that have been set down to govern Islamic finance.
For example, Shariah-compliant investment funds can only invest in Shariah-compliant shares, need to appoint a Shariah board, and need to donate prohibited types of income, like interest, to charity. There’s also a big emphasis on contract validity and transparency, to try and ensure there can be no future disputes.
Stocks of companies whose business relates to alcohol, tobacco, and gambling would not be Shariah-compliant. But nor would banks, as they derive income from interest.