My experience with goats and electric fence has been that they will charge right through if they want to badly enough. It shocks them, they scream and stumble, but keep right on going. If the rails on the horse fence are low enough and close enough together that the goats would have to slow down, scramble and squeeeeeeze through, they might not want to risk getting shocked by a collar for that long. But if they learn that the shock stops on the other side, and they can dash through, they very likely will.
What has worked for me is welded wire to keep them in, and an electric wire at shoulder height to keep them off the welded wire (they love to rub on the welded wire). Where I have board fencing, running an electric strand along the gap between the boards keeps them from trying to push through. A hot wire like that will also discourage predators that might crawl through a rail fence otherwise, though you will need to keep grass, etc, from growing up, since electric fencing will ground out through the plants and be rendered ineffective.
What has worked for me is welded wire to keep them in, and an electric wire at shoulder height to keep them off the welded wire (they love to rub on the welded wire). Where I have board fencing, running an electric strand along the gap between the boards keeps them from trying to push through. A hot wire like that will also discourage predators that might crawl through a rail fence otherwise, though you will need to keep grass, etc, from growing up, since electric fencing will ground out through the plants and be rendered ineffective.
But I do have an invisible fence controller and collars in the attic, and I have never even been tempted to try it on the goats. Why? Because my husband put them on some semi-feral dogs that we had adopted, without going through the step-by-step process that the manufacturer describes for introducing your dog to it. The dogs got near the wire, it shocked them, they started screaming bloody murder and took off running . . . . we didn't see them again until the next morning. Now, having seen my goats run through a fence that shocks them that they can see, I can't imagine they would allow themselves to be contained by a fence that shocks them that they can't see - those pointy-headed problem children would most likely just run faster.

