Electric fence needs to be carefully installed and then maintained after installation. Your fence controller should be either weatherproof or have a weather-resistant location. Solar systems will need open exposure. Make sure you have mounted the controller in a sturdy location. On this horse farm, it is mounted on the outside of the wood-board pasture fence (which is used to contain the horses), and the electric fence is used to separate areas to allow pasture rotation.
Consider also using insulltors on exterior fence posts to prevent shorts and to provide a solid attachment of the fence lines. Lines can be pulled tight when there is a sturdy base. If you feel uncomfortable with the installation process, including wiring and grounding the system, hire a professional to do it.
The spacing of the fence posts and the height of the fence will depend on the type of animal you wish to contain. Cows tend to be calm and slow, so the fence does not need to exceed their height. Goats jump more and the fence needs to be higher. Horses can jump, however with enough grazing area inside the fence, they will probably be easily contained. The smaller the area, the closer the fence posts should be to each other.