Democracy states that rule of law is by the people for the people ( basically people make halaal or haraam), but Islam states rule of law belongs to Allah swt. Isn't democracy shirk fil ahkam?
We do not find a specific type of governance in the Qur’an or in the Example of Prophet Muhammad (pbuh). Each of the governments established by the Companions of Prophet Muhammad (pbuh) had different characteristics from the other ones.
For example, Abu Bakr (r.a.) was elected by the votes of a group of Companions. Umar (r.a.) had taken over the governance through the bequest of Abu Bakr. Uthman (r.a.) was elected by a board established by Umar. The circumstances required Ali (r.a.) to become the ruler. David (pbuh) had succeeded Saul and became the king after him. Solomon (pbuh) had suceeded David (pbuh), where Saul had ruled by a command from God.
What matters is having a government which shall establish the safety and justice, observe the rights and freedoms and fight against social problems. The type of governance can be determined depending on the situation and the circumstances.
There is no reason which prohibits the head of the government to be chosen by election. Therefore, democracy is an option among the types of governance. In all types of governance, laws are possible to be made in accordance with God’s laws or against them. Human nature (fitra) is already created in accordance with Islam. Every type of government established by human-beings whose natural creation were not tainted can rule in accordance with God’s rules. However, every type of government can also be abused by malicious people.
In this day and age, many so-called “Islamic countries” are ruled according to the laws which are not compliant to the Qur’an. They take away from people the freedom of choosing their beliefs, dictate the worships of Islam in which there can not be coercion, despise and deprive women of their basic rights, etc. None of this pressure existed in any of the governments established by the Messenger of Allah (pbuh) or his Companions, because there cannot be coercion in religion, and they knew it very well:
“There can not be coercion in religion. Facts are made distinct from fictions. Whoever rejects the transgressors and trusts in God, they certainly have held onto the firmest handle which never breaks. God is all-listening, all-knowing.” (al-Baqarah 2:256)
Allah does not enforce anything to anybody. He only shows the right path, and then lets human free. Therefore, governments are not authorized to enforce certain acts, either:
“We guided him (human) to the right path, whether he ignores it or fulfills his duties.” (al-Insan 76:3)
Neither Prophet Muhammad (pbuh) nor any other ruler had the duty of dictating anything to anybody. Prophet Muhammad (pbuh) was only charged with informing people of the Qur’an and demonstrating a good Example for them:
“We know well what they say. You are not a dictator over them. So, inform them of the Qur´an, whoever fears My promise (that the Day of Judgment and Hereafter are truth).” (Qaf 50:45)”
When it comes to enforcing God’s prohibitions, it is clear everywhere on the earth that doing things against God’s prohibitions are bad for the person and the society. Most of the laws already include these prohibitions (against stealing, adultery, murder, false testimony,etc.) as a part of the lawsuit. Yet, those that are not forbidden by the laws, such as intoxicants and interest, are almost always in the monopoly of governments. Making laws that exactly match God’s laws must be the ideal of every ruler; but this must be done without limiting the rights and freedoms, including “the freedom of ignoring God’s right path in verse al-Insan 76:3”, that which God has granted to human.
Besides, it is not governments but human beings who have the potential to associate partners with God (shirk) or ignore the truth He has sent down (kufr). Every human being may go astray some day. Even prophets were at risk of associating partners with God, and therefore warned by God, because they were also human beings:
“(Oh Muhammad) it has been revealed to you and to those (prophets) before you: “If you associate partners with God, all of your deeds will surely come to naught and you will certainly be among the losers.” (Az-Zumar/The Companies 39:65)
Consequently, democracy and voting are not related to belief, kufr or shirk, but it is a possible option for governance.
 Please see the following: http://www.islamandquran.org/research/human-and-creation.html