An electric fence is a barrier that uses electric shocks to deter animals from crossing a boundary. Depending on the area to be fenced and remoteness of its location, fence energizers may be hooked into a permanent electrical circuit, they may be run by lead-acid or dry cell batteries, or a smaller battery kept charged by a solar panel.