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, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Allaah does not accept any religion except that which is sincerely devoted to Him while seeking His Pleasure. Allaah Says (what means): {Unquestionably, for Allaah is the pure religion.}[Quran 39:3] Furthermore, the Prophet said: “Actions are indeed judged by intentions.” [Al-Bukhari and Muslim] Therefore, whoever embraces Islam for the reason of marrying a woman and the like, then Allaah does not accept his becoming a Muslim, but in this worldly life, he should be treated (by people) as a Muslim unless he shows something contrary to this [to the religion of Islam].
Finally, it should be noted that a person may embrace Islam for a worldly purpose, but soon Allaah opens his heart for the religion of Islam, and then he becomes a good Muslim.
For more benefit, please refer to Fatwa 92009.