This excerpt is taken from the book of Fadhilat al-Sheikh Mubashir Ahmad Rabbani, may Allah have mercy on him, Ahkam and Masail of Ramadan.
Is the fast of a person who does not pray valid?
Question:.
Some scholars consider a Muslim individual who fasts but does not pray to be flawed. However, what does prayer have to do with fasting when I want to enter Paradise through the gate of Al-Rayyan along with those who fast, and it is known that fasting is a means of atoning for sins from one Ramadan to the next.
Fatwa:.
Those who criticize you for not praying and fasting are right, and this is because prayer is the pillar of religion, and Islam cannot stand without it. A person who deliberately neglects prayer is a disbeliever and is outside the fold of Islam, and the fast, charity, pilgrimage, or any good deed of a disbeliever is not accepted by Allah. This is because Allah Almighty has said:
وَمَا مَنَعَهُمْ أَن تُقْبَلَ مِنْهُمْ نَفَقَاتُهُمْ إِلَّا أَنَّهُمْ كَفَرُوا بِاللَّهِ وَبِرَسُولِهِ وَلَا يَأْتُونَ الصَّلَاةَ إِلَّا وَهُمْ كُسَالَى وَلَا يُنفِقُونَ إِلَّا وَهُمْ كَارِهُونَ
Reference: (At-Tawbah: 54)
"Their charities are accepted only because they have disbelieved in Allah and His Messenger, and they do not come to prayer except lazily, and they do not spend except with reluctance in their hearts."
Therefore, we say that when you fast and do not pray, your fast is not valid, and it will not benefit you before Allah nor bring you closer to Him. As for your belief that fasting serves as an expiation for sins from one Ramadan to the next, we say that you are unaware of the hadith that has been reported in this regard.
The Messenger of Allah, peace be upon him, said:
الصلوات الخمس والجمعة إلى الجمعة ورمضان إلى رمضان مكفرات لما بينهن ما اجتنبت الكبائر
"The five prayers, the Friday prayer to the next Friday, and the fast of one Ramadan to the next Ramadan expiate the sins committed in between, provided that one avoids major sins."
Reference: (Sahih Muslim, Al-Taharah, Chapter on the Five Prayers and Friday to Friday and Ramadan to Ramadan: 233, Musnad Ahmad 2/400)
The Messenger of Allah, peace be upon him, conditioned the expiation of sins from one Ramadan to the next on the avoidance of major sins during that time. However, when you fast and do not pray, you are not avoiding major sins. Consider that there is no greater major sin than neglecting prayer; in fact, neglecting prayer is outright disbelief. So how is it possible that your fast could serve as an expiation for your sins? Therefore, we say that neglecting prayer is disbelief, and your fast is not accepted.
O my brother! It is obligatory for you to turn to Allah, sincerely repent, and ensure the performance of the prayer that Allah has made obligatory upon you, and then after that, fast. This is why when the Prophet, peace be upon him, or our master Muadh ibn Jabal, may Allah be pleased with him, was sent as the governor of Yemen, he was told:
ليكن أول ما تدعوهم إليه شهادة أن لا إله إلا الله وأن محمدا رسول الله فإن هم أجابوك لذلك فأعلمهم أن الله افترض عليهم خمس صلوات فى كل يوم وليلة
"First, invite the people to the oneness of Allah and the acknowledgment of my prophethood. If they accept it, then inform them that Allah has made five prayers obligatory upon them every day and night."
Reference: (Sahih Bukhari, Al-Maghazi, Chapter on the Sending of Abu Musa and Muadh to Yemen before the Farewell Pilgrimage: 4327, Sahih Muslim, Book of Faith: 19)
Thus, the Prophet, peace be upon him, placed prayer after the testimony of faith, and then mentioned zakat.