Is Sham Marriage Allowed in Islam?
Question

What is your opinion about a person who falsely divorces his wife, i.e. formally having the divorce contract, without saying the word of talaq actually to her? This enables him to marry a European woman in order to get a residency. Then he will divorce the European woman and return his first wife to him afterwards. What is the ruling on this matter?
Praise be to Allah.The Sacred Nature of Marriage in Islam
Marriage is a serious covenant and it is one of the most important rulings of Shari`ah, by means of which intimacy becomes permissible and rights such as the Mahr (dowry) and inheritance are proven, and children are attributed to their father, and other rulings.
Toying with Marriage and Divorce Contracts is Forbidden
By means of divorce, a woman becomes forbidden for her husband and is deprived of inheritance, and she becomes permissible for other men to marry, subject to well-known conditions.
Our aim in explaining all this is to alert the Muslims to the necessity of not using these two contracts in ways other than that which has been prescribed by Allah, and not using them as tricks.
We have seen – unfortunately – men who will marry a woman not so that the intimacy with her which was forbidden becomes permissible, and not so as to form a family with her – as is the aim of the Shar`i contract – but so as to attain some worldly purpose, such as registering land, or getting a licence to open a business, or to get residency, or to enable the woman to travel outside her country.
In none of these cases is the man a husband or the woman a wife in the real sense, rather he is a husband on paper only! It is not more than ink on paper. This is a kind of toying with the rulings of Shari`ah. It is not permissible to do it or to take part in it, and it is essential to try to stop it when the aim is to achieve some prohibited purpose, such as the one who does that in order to get residency in a non-Muslim country.
The same may be said with regard to divorce. It is a Shar`i ruling and it is not permissible for anyone to take it lightly or to toy with its rulings. They call that a divorce on paper.
These people should all realise that they are sinning by doing this. Allah has not prescribed marriage and divorce so that the wife might be a name on the contract with no rulings and rights. They should realise that the rulings come into effect merely by virtue of the contract being done, if the conditions and essential parts of it are fulfilled, and that if any of these are missing it is invalid, and that divorce from the husband takes place if the words are merely uttered. There is no such thing in Shari`ah as marriage on paper and divorce on paper. The sin is further compounded if it is done in order to do something that is prohibited in the first place, such as one who uses it to avoid giving people their rights or paying debts to them, or if a woman uses it to get help given to divorcees by a state or institution, or so that she can live in a non-Muslim state where it is not permissible for her to reside, and other invalid, forbidden aims.
Shaykh Al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
The Lawgiver forbids treating the Verses (Laws) of Allah as a jest [Al-Baqarah 2:231] and forbids a man to speak of the Verses of Allah which are binding contracts except in a serious manner as they are meant to be. Hence it is forbidden to take them lightly and or to marry a divorced woman in order to divorce her so that it will be permissible for her to go back to her first husband. This is indicated by the verse in which He says (interpretation of the meaning): {And treat not the Verses (Laws) of Allah as a jest} [Al-Baqarah 2:231], and by the words of the Prophet (peace and blessings of Allah be upon him): “What is the matter with people who toy with the sacred limits of Allah and make a mockery of His verses (laws), (and say), I divorce you, I take you back, I divorce you, I take you back?” It should be understood that toying with them is prohibited. (End quote from Al-Fatawa Al-Kubra, 6/65)
Based on this, if a man marries a woman who is permissible for him, and it is done in accordance with the conditions prescribed in Shari`ah, with the essential parts being fulfilled and in the absence of any impediments, then it is a valid marriage with all that that implies.
If a man divorces his wife verbally, it counts as a divorce, even if he does not intend it as such.
As for a written divorce that is not uttered out loud, that is subject to further discussion as explained in the answer to question no. 72291.
Marriage Solely for Residency: A Forbidden Act
Marrying that European woman for the purpose of obtaining residency and then divorcing her is a forbidden action. We have quoted the Fatwa of Shaykh `Abd Al-`Aziz ibn Baz (may Allah have mercy on him) prohibiting such actions in the answer to question no. 2886.
This applies if he marries her without fulfilling the conditions of marriage, such as if he marries her without a guardian, or if there is any impediment to the validity of the marriage, such as if she is an adulteress who has not repented, or she is not one of the people of the Book (i.e., Jewish or Christian), in which case marriage to her is prohibited and is invalid.
If he marries her in a marriage that fulfils all the necessary parts and conditions, and is free of any impediments, then his marriage is valid with all that that implies, but his intention is forbidden.
Deception and Trickery in Marriage Are Major Sins
These reprehensible actions of obtaining a divorce paper for the first wife and marrying another woman for the purpose of obtaining residency, then divorcing her, include two other things that are prohibited:

Trickery, lying and giving false witness, because it is deceiving the state and tricking it in order to obtain nationality, which is prohibited.
He wants to do the divorce and marriage on paper in order to get residency in a non-Muslim country, but in our religion it is forbidden to settle among the disbelievers unnecessarily, because of the great danger that this poses to one’s religious commitment and morals, and to the individual and the family.

It was narrated from Jarir ibn `Abdullah (may Allah be pleased with him) that the Prophet (peace and blessings of Allah be upon him) said: “I disavow any Muslim who settles among the polytheists.” (Narrated by Abu Dawud, 2645; and classed as authentic by Al-Albani in Sahih Abu Dawud)
What we advise our brothers to do is to fear Allah, may He be Exalted, with regard to Shar`i contracts and not to use them as means to worldly ends, and to refrain altogether if the purposes are prohibited. They should fear Allah with regard to their wives and children, and think about the great hardship that their actions may lead to, or the deprivation of rights and other negative consequences that may result from doing these contracts in this corrupt manner.
For more details, please see the following answers: 22728, 116994, 113867, 364.
And Allah knows best.