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. We ask Allaah to exalt his mention as well as that of his family and all his companions.
There is no harm in taking the pension that the state or the cooperative insurance pays to the participants or non-participants if the money that is taken from the participants is invested in permissible fields whether the wages were taken on a long duration or a short duration. However, if the money is invested in banks that deal with usury and interest or other forbidden acts, or that the money is taken from the participant in order to recompense him when he is harmed and not on the basis of cooperation, then it is not permissible to participate in such pension in principle. Nonetheless, if the person is obliged to participate in it, then he should only take the exact amount that he had contributed and should not take any excess money as it is forbidden money.
Allaah knows best.