If any element of shirk (polytheism) infiltrates an act of worship, that act is ruined, as the Almighty says: “It has been revealed to you and to those before you that if you ever associate others with Allah, your deeds will surely come to nothing and you will certainly be among the losers.” ⦗39:65⦘
He likewise says: “Had they associated others with Him, all that they were doing would have been rendered void.” ⦗6:88⦘
Thus an action is not truly called worship unless it is founded upon tawhid (pure monotheism), just as prayer is not truly called prayer unless it is preceded by purification. When shirk mixes with worship, it corrupts and nullifies it, just as ritual purity is nullified when one of the things that break wuduʾ occurs. For that reason Allah often links the command to worship Him with the prohibition of shirk.
He, exalted is He, says: “Worship Allah and do not associate anything with Him.” ⦗4:36⦘
And He says: “They were commanded only to worship Allah, devoting the religion exclusively to Him, as people of pure faith.” ⦗98:5⦘
He also says: “We never sent a messenger before you without revealing to him: ‘There is no deity except Me, so worship Me.’” ⦗21:25⦘. The statement “There is no deity except Me” carries two directives: it negates every form of shirk and affirms that worship belongs to Allah alone.
He further says: “Your Lord has decreed that you worship none but Him.” ⦗17:23⦘ And He says: “We sent to every community a messenger, saying, ‘Worship Allah and shun the taghut (false deities).’” ⦗16:36⦘. In this way He paired the worship of Allah with the avoidance of the taghut.