The Shias do not worship the graves nor do they worship the people inside it. That would be Shirk. Worshiping anyone apart from Allah has no place in the Jafferi School.
Visiting the Shrines of the Prophets and Imams
Touching or kissing the shrines of the Prophet and the imams does not imply shirk, nor does it associate that particular person with Allah, because Allah has the ultimate sovereignty in this universe, and Muslims submit to, worship, and seek help only from Him. Visiting the shrines is merely a gesture of respect.
If the Prophet or the imams were alive then out of admiration people would shake their hands or kiss them. Since they are dead and people know that their shrines contain their sacred bodies, and perhaps their souls, then touching or kissing their shrines is a way of renewing allegiance and loyalty to these leaders.
People are well aware of the fact that such shrines are made of ordinary material and the worshippers know that it has no power of benefit or harm; nevertheless, the respect and tribute is for what the shrines represent—the souls of these great personalities. Besides, being present within the precincts of the sacred shrines gives the worshipper a sense of being in a sacred and holy place.
The Noble Qur’an teaches that when Prophet Yaqub cried over the separation of his son, Yusuf he lost his eye sight. Years later, Yusuf sent his shirt with one of his brothers and told him to put it on the face of his father so that he would regain his sight. The Qur’an says:
Go with this shirt of mine and cast it over the face of my father. He will become seeing. And bring to me all your family. And when the caravan departed (Egypt), their father (who was in Palestine) said, “I do indeed sense the smell of Yusuf, if only you think me not sane.” They (his family) said, “Certainly you are in your old error.” Then when the bearer of glad tidings arrived, he cast it (the shirt of Yusuf) over his face, and he became seeing. He said, “Did I not say to you that I know from Allah that which you know not?”
Although Yusuf’s shirt was made of regular cotton material, which most of the people wore at that time, Allah made it bear His blessings because it touched the body of Yusuf. Thus with Allah’s permission and authority, this shirt, when it was put on his face, enabled Yaqub to see.
If touching the shrine of the Prophet or Imam ‘Ali or Imam Husayn is shirk (because these shrines are made from iron) then why do millions of Muslims touch the stones of the Holy Ka‘bah? Were these stones brought from Paradise or were they ordinary stones used from the land of Hijaz? All Muslims agree that the Prophet kissed al-Hajar al-Aswad, the Black Stone on the Ka‘bah, whereas he certainly did not go around kissing the stones in the alleyways and streets of Makkah, even though they may have been more alluring than the Black Stone.
Today, in most countries, both Muslim and non-Muslim, the flag of a nation is so sacred that soldiers, even civilians kiss it and put it on their faces. Does that mean they are worshipping a piece of cloth? Certainly not! The moral behind these examples is that they are glorifying the ideas behind the stones or the shrines or the flags, and these are the principles and etiquette which were carried by the great leaders and countries.
Imam al-Bukhari narrates that whenever the Prophet did the ablution (wudhu’), the Muslims used to gather and collect the remaining water and pour it over their faces for blessings. He also narrates that even the sweat of the Prophet was collected, in the following incident, “Umm Salamah was putting some cloth under the Apostle of Allah when he slept. There was a lot of perspiration from his body. She brought a bottle and began to pour the sweat in that. When the Apostle of Allah woke up he said, ‘Umm Salamah, what is this?’ She said, ‘That is your sweat which we mix in our perfumes, and they become the most fragrant perfumes.’”
 Noble Quran, 12:93
 Sahih al-Bukhari, “Kitab al-Libas”, Vol. 7, 199
 Sahih al-Bukhari, “Book on Taking Permission”, Hadith 5809; Sahih Muslim, “Book on the Virtues”, Hadith 4302; al-Nisa’i, “Book on Ornamentation”, Hadith 5276; Musnad Ahmad ibn Hanbal, Vol. 3, 103, 136, 221, 226, 230, 231, and 287; Vol. 6, 376