danno is right on using the peanut butter on the foil. When animals get shocked and their eyes are outside the wire enclosure (for example, they are shocked on the nose) they will recoil and back away from the fence. However, when their eyes are within the wire enclosure (for example, they are shocked on the shoulder) they will charge on through the fence.
I have an eight-foot high deer fence, surrounding ten acres, around more home. The deer love my ornamental and vegetable plants, especially hosta and daylillies. This fence uses eight high-tensile wires spaced one foot apart. The bottom two wires are hot. The next six alternate between gounded and hot.
I have found that I you make all the wires hot, they will not get an adequate shock (12,000 volts) when the ground is dry. The grounded wires are grounded to the fence controller. This way even if an animal jumps through the fence they will receive a shock.
By the way, it will get your attention!!! I know, I have been shocked a few times holding a ground wire down and stepping through the fence when it is on. You will know it when you back accidentally grazes the hot wire above. I can best describe it as if someone hit you with a baseball bat and at the same time every muscle in your body contracts. At 66, I'm getting a little too old to be crawling through 12,000 volt electric fences. So i think I will take the time to turn it off in the future.
But, I do know how the animals feel and it does work very well after they get use to it. The contoller is from Tractor Supply and it is designed for 200 miles of fence. However, lightening strikes are a problem. If have three controllers, so I can be sure to have one on hand while others are being rebuilt. I believe it cost about $100. to have one repaired.