Shaykh Ibn ‘Uthaymeen was asked in Fataawa al-Siyaam (p. 87) about the ruling on the fasting of one who does not pray.
He replied:
The fast of one who does not pray is not valid and is not accepted, because the one who does not pray is a kaafir and an apostate, because Allaah says (interpretation of the meaning):
“But if they repent [by rejecting Shirk (polytheism) and accept Islamic Monotheism], perform As-Salaah (Iqaamat-as-Salaah) and give Zakaah, then they are your brethren in religion”
{Surah At Tawbah 9: Verse 11}
The Prophet ﷺ said: “Between a man and shirk and kufr stands his giving up prayer.”
[Sahih Muslim, 82]
And he ﷺ said: “The covenant that separates us from them is prayer; whoever gives up prayer is a kaafir.”
[Al-Tirmidhi, 2621; classed as saheeh by al-Albaani in Saheeh al-Tirmidhi]
This is also the view of most of the Sahaabah, if not their consensus. ‘Abd-Allah ibn Shaqeeq (may Allah have mercy on him), who was one of the well-known Taabi’een, said: The companions of the Prophet ﷺ did not think that omitting any action made a person a kaafir, except for prayer. Based on this, if a person fasts but he does not pray, then his fast is rejected and not accepted,
and it will not avail him anything before Allah on the Day of Resurrection. We say to him: Pray then fast, because if you fast but do not pray, then your fast will be rejected, because acts of worship are not accepted from a kaafir.