Punishment actually does work to shape different behaviors in children. What you want to use punishment for is to guide your child towards a more positive, acceptable means of behavior. I like to think of punishment and discipline and consequences as something that goes hand-in-hand. Parents often ask me, "What type of punishment should I use for this specific situation?" I always remind parents that punishment needs to be something that's realistic. And it needs to be a situation or a consequence that really fits the negative behavior. For instance, if a child breaks something in the home, a punishment or consequence may be to take time away from your child's computer time and fix the particular thing that they broke, so that there's actually a connection between the negative behavior and something positive.
Punishment should never be punitive. It should be something that's used as a teaching situation. I often want to remind parents too that punishment, discipline and consequences aren't the only ways to shape behavior. But before you even get to a consequence, you may want to try praise and encouragement when your child is doing something positive.