Electronic training involves the use of an electric shock as an aversive. Common forms are collars which can be triggered remotely, or that are triggered by barking, fencing that delivers a shock when a dog wearing a special collar crosses a buried wire, and mats that can be placed on furniture to deliver a shock. Some aids deliver an aversive such as a spray of citronella when triggered.[65] The use of electric shock aversives for training dogs is the subject of considerable controversy. Supporters claim that the use of electronic devices allows training at a distance and the potential to eliminate self-rewarding behaviour, and point out that properly used, they have less risk of stress and injury than mechanical devices, such as choke chains. Opponents cite the risks of physical and psychological trauma associated with incorrect or abusive use.[66]

Unless you plan to keep your dog outdoors--and few of us do because it's not recommended--you'll need to teach your dog where to eliminate. Therefore, house training (also called housebreaking or potty training) is one of the first things you need to work on with your dog. Crate training can be a very helpful part of the training process. This includes house training as well as many other areas of training:
This method is the most effective and flexible. Your pup needs to develop his natural "den instinct" and learn where to eliminate - and where not to. To potty train our puppy we must condition a desire in the pup to avoid soiling the "den" - your house. Confinement and your due diligence in providing access outside the "den" to potty and poop will develop this instinct and eventual desire. When and how to use confinement is described in detail below.
Learned helplessness occurs when a dog ceases to respond in a situation where it has no option to avoid a negative event. For learned helplessness to occur, the event must be both traumatic and outside the dog's control.[53] Family dogs that are exposed to unpredictable or uncontrolled punishment are at risk of developing disturbances associated with the learned helplessness disorder. Punishment which is poorly coordinated with identifiable avoidance cues or response options, such as when punishment takes place long after the event, meet the criteria of inescapable trauma.[43]
In one study laboratory-bred Beagles were divided into three groups. Group A received an electric shock when the dogs touched the prey (a rabbit dummy fixed to a motion device). Group H received a shock when they did not obey a previously trained recall command during hunting. Dogs in group R received the electric shock arbitrarily, i.e. the shock was administered unpredictably and out of context. Group A did not show a significant rise in salivary cortisol levels, while group R and group H did show a significant rise. This led to the conclusion that animals which were able to clearly associate the electric stimulus with their action, i.e. touching the prey, and consequently were able to predict and control the stressor, did not show considerable or persistent stress indicators, while animals that were not able to control the situation to avoid the shock did show significant stress.[66]
When she feels an urge, the puppy will usually let you know by whining and scratching. That’s her signal that she has to go and wants out of her little den. Now! Don’t delay because if you let your pup lose control in her crate, she’ll get the idea that it’s OK to mess up her living space. Then she’ll think nothing of leaving little packages around where you live, too.
If pup is peeing in the wrong place... you may be able to stop him. Move quickly towards him when he begins to pee and pick him up. Urgency is key here - you want to startle the pup just a little as you move towards them to pick them up, but you DO NOT want to scare the pup. You are redirecting your puppy to the right spot - not disciplining him. Immediately after picking him up, take him to the potty area and patiently wait. Most pups will finish there. Reward your pup with exuberance!

A dog learns from interactions it has with its environment.[1] This can be through classical conditioning, where it forms an association between two stimuli; non-associative learning, where its behavior is modified through habituation or sensitisation; and operant conditioning, where it forms an association between an antecedent and its consequence.[2]