Shaykh Muhammad ibn ‘Uthaymeen (may Allaah have mercy on him) said:
The hadeeth indicates that the one who says Laa ilaaha ill-Allaah is a true believer, but he is tempted by his whims and desires, so he does some acts of disobedience or major sins such as stealing etc.
The belief of Ahl al-Sunnah wa'l-Jamaa'ah is that the destiny of the believer, even if he commits a major sin, is Paradise. Whatever punishment may come before Paradise is up to Allaah: if He wills, He will punish him, and if He wills, He will forgive him. The evidence for that is the verse in which Allaah says (interpretation of the meaning):
“Verily, Allaah forgives not that partners should be set up with Him (in worship), but He forgives except that (anything else) to whom He wills”
So all those who committed sins – even if they were major sins – if the sins were less than kufr, they will not be prevented from entering Paradise. For the destiny of the one who did them is Paradise, but he may be punished for the sins that he committed, or Allaah may forgive him. The matter rests with Allaah. As for the hypocrites and followers of bid’ahs which put a person beyond the pale of Islam, they did not really say Laa ilaaha ill-Allaah meaning it from the heart, because this hypocrisy which led to kufr is the opposite of sincerity, and sincerity is essential to saying Laa ilaaha ill-Allaah.
If a person says Laa ilaaha ill-Allaah, but he believes that there is no God, or he believes that there is another god alongside Allaah who controls the universe, or he believes that all the companions of the Prophet (peace and blessings of Allaah be upon him) apostatized after his death, or other bid’ahs that put a person beyond the pale of Islam, then such people are not sincere in their saying Laa ilaaha ill-Allaah, because their bid’ah goes against the words of the Prophet (peace and blessings of Allaah be upon him): “Whoever bears witness that there is no god except Allaah or says Laa ilaaha ill-Allaah, will enter Paradise.”
The Shahaadatayn must be spoken with sincerity. Listen to what Allaah says concerning the munaafiqeen (interpretation of the meaning):
“And when they [the hypocrites] stand up for As-Salaah (the prayer), they stand with laziness and to be seen of men, and they do not remember Allaah but little”
In the same passage, Allaah says (interpretation of the meaning):
“Verily, the hypocrites will be in the lowest depth (grade) of the Fire; no helper will you find for them”
And Allaah says of them (interpretation of the meaning):
“When the hypocrites come to you (O Muhammad), they say: ‘We bear witness that you are indeed the Messenger of Allaah’”
This is merely verbal testimony, but:
“Allaah knows that you are indeed His Messenger, and Allaah bears witness that the hypocrites are liars indeed”
[al-Munaafiqoon 63:1 – interpretation of the meaning]
i.e., that they are lying when they say, “We bear witness that you are indeed the Messenger of Allaah”. For they mention Allaah and bear witness to His Messenger, but their hearts are devoid of that which is uttered by their lips.