By Ibn Uthaymeen Rahimahullah
If a rational person has the slightest speck of faith in his heart, it is not possible for him to persist in not praying when he knows how important the prayer is and that it was enjoined from the highest place that any human ever reached.
How can he bear witness that there is no god but Allah and yet persist in not praying?
A testimony such as this obliges him to worship Allah by means of the greatest act of worship. It is essential to confirm words with actions, so it is not possible for a person to claim something that he does not do; rather in that case he is a liar in our view.
How come we describe him as a disbeliever on the basis of the texts which describe him as such, even though he says Laa ilaaha ill-Allah (there is no god but Allah), but we do not describe him as a disbeliever for not praying, even though the texts clearly state that he is a disbeliever?
This is nothing but a contradiction.
According to the hadeeth of Mu‘aadh, the Prophet (blessings and peace of Allah be upon him) said: “There is no one who testifies that there is no god but Allah and that Muhammad is the Messenger of Allah, sincerely from the heart, but Allah will protect him from Hell.” (Agreed upon)
According to the hadeeth of ‘Itbaan ibn Maalik, he (blessings and peace of Allah be upon him) said: “Verily Allah has forbidden to the Fire anyone who says Laa ilaaha ill-Allah, seeking thereby the Countenance of Allah.” (Agreed upon)
So uttering the Shahaadatayn (twin declaration of faith) is dependent upon sincerity of intention and sincerity in the heart, which would prevent a person from failing to pray. That is because there is no one who is sincere in saying that but his sincerity would inevitably motivate him to do the prayer. The prayer is the foundation of Islam and is the connection between the slave and his Lord. If he is sincere in seeking the Countenance of Allah, then he will inevitably do that which will help him to attain that, and he will avoid that which would prevent him reaching that goal.
By the same token, if a person bears witness that there is no god but Allah and that Muhammad is the Messenger of Allah, sincerely from the heart, that sincerity will inevitably motivate him to perform the prayer sincerely for the sake of Allah, may He be exalted, and thus following the Messenger of Allah (blessings and peace of Allah be upon him), because that is one of the requirements of that sincere testimony.
Source: ash-Sharh al-Mumti‘ (2/31-36)