Some, or maybe most dogs will at an early age start to bark at their owners for attention. Most owners, through a lack of knowledge or out of frustration and impatience, would then respond by either calling the dog to them and trying to calm it, or by yelling at the dog to stop barking. This is exactly what the dog wanted! It does not take long for the dog to realise that if he barks, he receives attention.
Barking is attention seeking
If this attention-barking is not stopped within the first couple of days, the dog may develop a habit of bark-for-attention. This unwanted behaviour can even develop to such a degree that it can be classified as a compulsive disorder. The best way to stop this from happening is to prevent it to become a habit in the first place. This should be done within the first day or two.
If this barking behaviour is a mild attention-seeking activity, just avoiding reinforcement may be enough to stop it. In other words it may be enough for the owner to just ignore the dog. The dog will realise that no attention is given and will stop his barking.
Barking for rewards
If, on the other hand, his barking has been rewarded a few times even by yelling at him, he might be more persistent. It might then be necessary to reward alternate behaviours. The owner could use a clicker and click for every period of silence, even if it is only a second or two. He can later demand a longer period of silence before clicking and add a cue to the silent behaviour.
Boredom barking
Some dogs do not only bark for attention. Especially dogs that are left alone for hours at a time, will start barking out of boredom. With breeds like Border Collies and Australian Shepherds an increase in mental and physical exercise might be enough to stop the barking.
Other bark-stoppers that professional trainers use are:
A shaker can.
You can fill a can with pebbles or coins and when the dog starts barking, you shake the can. The noise will startle the dog and he will stop barking. At that very moment, click and treat the dog.
Spray bottle
The concept works exactly the same as the shaker can. Fill the bottle with water and when the dog barks, spray him with water. He will stop barking for a moment and then you must click and treat the dog.
To be successful at training your dog not to bark, you must be very consistent. Use positive reinforcement methods when you train the dog. The best is to stop the unwanted behaviour before it becomes a habit.