The answer depends on why your dog is barking—is it in your presence or absence? Is it a sign of a behavioural problem? Many dogs will bark for attention, and if food or reward is given, the behavior is reinforced. Therefore, the first step is not to give attention to your barking dog. If the barking is caused by passing pedestrians or other stimuli, you may need to keep your dog in the backyard or inside.
Using a halter and lead, you can stop a dog barking by pulling on the lead which closes the mouth and distracts the dog. As he stops barking, give the ‘hush’ command. There are some anti-barking devices available, such as the Aboistop Collar that emits a spray of citronella each time the dog barks and is sufficiently unpleasant to deter most dogs. Some dogs only require the collar for a couple of weeks to stop barking, although others will require training as well since they learn when the collar is on or off. Distractions such as loud noises (loud whistles, stones in a can) that result in silence that is then rewarded.