Wear leather soles !!! These conduct the charge without shock while man- made fibres provide insulation so the charge builds up until you touch something conductible and you get a ...big shock. Not always practical for kids shoes - I've never seen a leather soled shoe for kids.
If happens a lot in dry weather and heated dry atmospheres like dept stores. Dampen a hanky and hold it in your pocket.
If in a car, lean out and touch the ground or first touch the gatepost (wooden or stone). I know I feel like I'm the Pope but its better than shock therapy...
Thankfully it doen't happen much in Ireland, I used to live in Denmark where this was a major problem for me.