The reason for the electric shock is actually potential difference generation between the point of contact and the ground or any other conducting material.
You may have noticed that you dont get any electric shock when you are standing on some rubber.The reason is that. Due to the potential difference generation a current flows through your body which gives the shock.
Current can flow only if there is a potential difference (voltage). And the amount of current flowing depends on the voltage applied, current sourcing capability and the resistance between the two points of application. ( ohm’s law)
Human body offers certain amount of internal resistance. When a voltage is applied to a human body, the amount of current flows through the body depends on the body resistance which varies from people to people.
Though, shock is the sensation felt due to the flow of current through the body, voltage is required to cause the flow of current.
So, electric shock is the combination of both voltage and current.
Voltage is an independent quantit w.r.t Current. Whereas, Current is a dependent quantity w.r.t Voltage. This is from Ohm’s law which states that Potential difference between 2 points causes flow of electric current (and not vice versa).
Hence, the first cause is voltage which leads to current flow.