If a Muslim prays five times a day, recites Qur'an every day, and also fasts all days of Ramadan, but also has a relationship with a boy (she talks to him over the phone and also sometimes they get together or sometimes they shake hands or kiss), do these second set of acts cause the first set (prayers and fasting) to not be accepted?
Let us remember the acceptance of prayer if person drinks alcohol.
Ahaadeeth was narrated by Ibn Maajah (3377) from ‘Abd-Allaah ibn ‘Amr who said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Whoever drinks alcohol and gets drunk, his prayer will not be accepted for forty days and if he dies he will go to Hell. But if he repents, Allaah will accept his repentance. If he again drinks alcohol and gets drunk, his prayer will not be accepted for forty days and if he dies he will go to Hell. But if he repents, Allaah will accept his repentance. If he again drinks alcohol and gets drunk, his prayer will not be accepted for forty days and if he dies he will go to Hell. But if he repents, Allaah will accept his repentance. If he commits (this sin) again, then Allaah pledges to make him drink the mud of khabaal on the Day of Resurrection.” They asked, “O Messenger of Allaah, what is the mud of khabaal?” He said, “The juices of the people of Hell.” Classed as saheeh by al-Albaani in Saheeh Ibn Maajah.
The fact that his prayers are not accepted does not mean that they are not valid, or that he should give up praying, rather it means that he will not be rewarded for them.
So the benefit of praying will be that he will have discharged his duty and will not be punished for not doing it.
Lets come back to the relationship of girl and boy.
The causes of zina include the following:
1 – Unveiling and wanton display by uncovering the face, hair or any part of the body. It was narrated in the hadeeth that the Prophet (peace and blessings of Allaah be upon him) said: “There are two types of the people of Hell whom I have not seen… Women who are clothed yet naked, who have gone astray and try to lead others astray also. Their heads look like the humps of camels, leaning to one side. They will never enter Paradise nor even smell its fragrance, although its fragrance may be detected from such and such a distance.” (Narrated by Imam Muslim, al-Libaas wa’l-Zeenah, 3971).
2 – Being alone with a man who is not a mahram for you, because the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “No man should be alone with a (non-mahram) woman unless her mahram is present.” (Narrated by al-Bukhaari, 3842).
3 – Beware of mixing with those whom you are not permitted to mix with, for zina only happens as a result of that. You must pay attention to your conscience and do not pay attention to the whispers of the Shaytaan when he tries to make zina look attractive and to make this crime seem insignificant. The Shaytaan has sworn by Allaah’s Glory that he will mislead the sons of Adam. Allaah says (interpretation of the meaning):
“[Iblees (Satan)] said: ‘By Your Might, then I will surely, mislead them all, Except Your chosen slaves amongst them (i.e. faithful, obedient, true believers of Islamic Monotheism)’” [Saad 38:82]
In Saheeh Muslim it is narrated that Jaabir ibn ‘Abd-Allaah said: “I heard the Messenger of Allaah (peace and blessings of Allaah be upon him) say, ‘Between a man and kufr and shirk there stands his giving up prayer.’” (al-Eemaan, 116). And he (peace and blessings of Allaah be upon him) said: “The covenant that differentiates us from them is prayer; whoever gives it up is a kaafir.” (Narrated by al-Tirmidhi, al-Eemaan, 2545; classed as saheeh by al-Albaani in Saheeh Sunan al-Tirmidhi, 2113)
You should not think that repentance is too difficult or feel that Allaah will never accept your repentance, for the Shaytaan is keen to sow the seeds of despair in your heart.
You should note that whoever repents, Allaah will accept his repentance and change his bad deeds into good deeds. Allaah says (interpretation of the meaning):
“Except those who repent and believe (in Islamic Monotheism), and do righteous deeds; for those, Allaah will change their sins into good deeds, and Allaah is Oft-Forgiving, Most Merciful. And whosoever repents and does righteous good deeds; then verily, he repents towards Allaah with true repentance” [al-Furqaan 25:71]
So girl should repent and cut off all the routes that may lead to evil, by means of the way prescribed in sharee’ah which Allaah has permitted, namely marriage. And she should not stop making prayer and other muslim actions. At least she will not be punished for not doing them.
And Allaah knows best.