Shock collars (also called bark collars) are a form of punishment and work by remotely delivering an electric shock to the neck. They do cause some pain, which can vary depending upon the intensity of the shock given. While this shock may not cause physical harm, it can cause psychological damage to a dog when used incorrectly, as it relies on very precise timing to deliver the punishment effectively.
Shock collars differ in the strength of shock they deliver and the way the shock is triggered. Collars used to control barking may be set off by vibration of the dog’s vocal cords, or by the sound of the dog barking. Other shock collars are activated by a handheld remote-control device held by a person. Oftentimes, dogs are shocked after a behavior has occurred and thus they fail to make the connection between their action and the punishment. This can create unintended behavior problems. Therefore, they should only be used by professionals, by those trained by professionals, or as a last resort. Their use should only be considered when other training options have been tried and have failed. They should also only be used for training purposes and not general use.
You should always consult with a veterinarian or an animal behaviorist before using an electric shock collar.
A more humane collar is the citronella anti-bark collar, which delivers a spray of citronella instead of a shock and has been found to be much more effective in reducing unwanted behavior.
From the article Dog Collars and Harnesses: