Current Legal Issues
Some companies could appoint the bank to sell shares for them. The bank acts as an intermediary to carry out the transaction for a fee agreed between the company and the bank.
For, in reality, this could be treated as a form of ijarah. In the sense that the company hires the bank to do the work for them for an agreed fee. It could also be treated as a form of ji'aala. In either case, the transaction is in order, and the bank has the right to charge a fee in return for carrying out such work.
Of course, the nature of business of some companies is such that dealing with them is haraam, such as companies of alcoholic drink or companies dealing with usury. Thus, it is not permissible to buy their shares or enter into transactions with them.