The first question: If a man says to another, “Buy me a car in your name on installments, and I will pay you the installments at their due dates, and you will have one thousand riyals for that”—is this permissible?
The second question: A man said to another, “Sell me your building and give me a deed to it in a sham sale so that, by means of the sale’s appearance, I can obtain from the state a loan of five hundred thousand; you will have one hundred thousand riyals when I receive the loan.” Is this permissible or not?
Answer to the first question:
What appears [to be correct] is the permissibility of taking the one thousand riyals in return for that service which the purchaser renders to the man—provided there is no increase in the price on account of the term. In reality, this is a hire (ijārah) to purchase the car on installments and to pay the installments at their due dates; there is nothing in this hiring that prevents its validity or the permissibility of taking a fee for it. The default in transactions is validity.
Answer to the second question:
Stratagems (ḥiyal), generally speaking, are permissible if they are a means and path to something permissible and lawful.
The stratagem mentioned in the question is intended to obtain a loan from the state, and borrowing from the state or from others is, in principle, permissible across the board. I have not seen anything that prevents the permissibility of the stratagem mentioned in the question.
If it is said: Perhaps the state has allocated and designated a sum of money for loans to those in need of housing and not to others. In that case the stratagem would be a means to taking the rights of those in need of housing, which is not permissible, and the stratagem would thus be prohibited.
The reply: Even if the state designates and allocates an amount for those in need of housing, the wealthy do not take loans, because their wealth is manifest and well known. As for the rest of the citizens, each one of them has a right due from the state, whether he has a house or not. Thus, by that stratagem he is merely obtaining his right or part of his right.
Source: Min Thimār al-ʿIlm wa al-Ḥikmah vol.2