Horse gets a mild shock when touching the wire in an electric fence because the horse completes the circuit of flow of electricity from the  fence to the ground.
Horse completes the circuit as it have naked feet that directly touches the ground.

We don't get a shock as we wear shoes that breaks the circuit from the fence to the ground but even we will get a shock if we have a naked feet  
hope this answer helps you
thanks a lot
u r welcome

This Is a Certified Answer

Certified answers contain reliable, trustworthy information vouched for by a hand-picked team of experts. Brainly has millions of high quality answers, all of them carefully moderated by our most trusted community members, but certified answers are the finest of the finest.
Electric fences are set up so that the horses do not run away breaking through the fence or try to jump over them.  Due to the shocks they try to keep away from the fence.

There is electric power supply connected to metallic fences.  The fence is at a higher potential as compared to the ground.  The animal bodies are conductors of electricity.  The reason is we have salts, minerals, acids, bases and water in our body.

When a horse touches the fence, an electric circuit is formed from the fence to the horse , its legs to the ground.  The ground is at a potential of 0.  Thus due to the potential difference difference, electricity passes through the body of the horses.
Due to the current, the body gets heated up, the passing of electrons creates a sensation though the body.  This results in a shock.

the voltage is kept low enough not to damage or hurt the horses.

1 5 1