Q: Will Allah forgive us for shirk? Can we repent from shirk? How do we repent? Is there any special prayers we must offer (any duas)?
A: Shirk is the greatest of sins, because Allah has told us that He will not forgive the one who does not repent to Him from it, but in the case of lesser sins the matter is subject to His will: if He wills, He will forgive the one who meets Him with that sin unrepented for, and if He wills, He will punish him. This means that we should fear shirk greatly, as it is so serious before Allah.
Fath al-Majeed, p. 58.
Hence we must repent from all kinds of shirk, whether it is major shirk or minor shirk. If a person repents sincerely then Allah will accept his repentance and forgive him his sins.
Repentance from shirk means giving it up and submitting to Allah alone, regretting one's neglect of Allaah’s rights and resolving never to go back to it. Allah says (interpretation of the meaning):
“Say to those who have disbelieved, if they cease (from disbelief), their past will be forgiven” [al-Anfaal 8:38]
The Messenger of Allah (peace and blessings of Allah be upon him) said that the gate of repentance remains open so long at the death rattle has not reached a person’s throat. He (peace and blessings of Allah be upon him) said: “Allah will accept His slave’s repentance so long as the death rattle has not yet reached his throat.” (Narrated by al-Tirmidhi, 3537; see also Saheeh al-Jaami’, 1425.
Whoever commits major shirk that puts a person beyond the pale of Islam must repent sincerely from that, put his actions straight and correct his intention. It is also prescribed for him to do ghusl after repenting, because the Prophet (peace and blessings of Allah be upon him) commanded Qays ibn ‘Aasim to do that when he became Muslim. (Narrated by Ahmad, Abu Dawood, al-Tirmidhi and al-Nasaa’i; classed as saheeh by Ibn al-Sakan.
Fataawa al-Lajnah al-Daa’imah, 5/317
With regard to minor shirk, the Messenger of Allah (peace and blessings of Allah be upon him) warned us against it, fearing that his Ummah might fall into it. He (peace and blessings of Allah be upon him) said: “The thing I fear most for you is minor shirk.” (Narrated by Ahmad, 23119. al-Albaani said in al-Silsilah al-Saheehah (951): its isnaad is jayyid). And he said: “Shirk among you is more subtle than the sound of the footsteps of an ant on a rock. Shall I not tell you of something, which, if you do it, it will take that away from you, both minor and major forms of it.