The shock doesn’t hurt the large dogs, just gets there attention, there’s an adjustable setting on it to gradually increase/decrease that. I would not recommend it for small dogs, big dogs are stronger.
It isn’t the shock itself that I’m concerned about. You have train the dog to respond properly by backing away from the fence line. If the dog is trained to do that and ends on the other side of the fence, it will stick to it’s training and not be able to enter the yard.