In Islam the concept of ibadah is far more comprehensive than the concept of "worship" which is often used to translate the word into English. Ibadah, as understood in Islam, includes every action that is performed with the intention (or niyyah) of fulfilling the wishes of the Creator, whether directly or indirectly. Thus, not only prayer is ibadah but also going to the mosque for prayer or preparing to go to the mosque is also ibadah, for these actions are directed toward the fulfillment of a divine commandment. Even such primary functions as eating, sleeping, etc. can become ibadah if they are carried out with the intention of getting the physical strength or ability to fulfill divine commandments.
Now, it is one of the divine wishes that believers run their affairs through mutual consultation (shura banahum). In fact, in one Qur'anic passage God expresses this wish alongside His wish that believers establish regular prayers and regular charity:"And (remember) that whatever you are given (now) is but for the passing enjoyment of the life of this world, whereas that which is with God is far better and enduring. (It shall be given) to all those who have faith and who put their trust in their Lord; who avoid the more serious sins and shameful deeds; who whenever they are moved to anger, readily forgive; who harken unto their Lord and are regular in their prayer; who run their affairs by mutual consultation; and who spend out of what We have given to them. (42:36-38)Now, voting is a form of shura or consultation. Through it a community consults its members as to who should direct its affairs for a given period of time. Consequently, it would be counted as ibadah in Islam if a Muslim votes with the following niyyah:"I cast my vote, O Lord, in fulfillment of Your wish that believers run their affairs by mutual consultation and in the hope that most suitable persons may be entrusted with the affairs of the Muslims."With this niyyah not only the voting would be counted as ibadah but also traveling for the purpose of voting, waiting in line to cast one's vote, etc.
First published in Al-Ummah, Montreal, Canada in 1985. Copyright Dr. Ahmad Shafaat. The article may be reproduced for Da'wah purpose with proper references.