Our method for preparing a horse for halter showing includes training the horse so when the command “square” is give, the horse squares themselves up. We prefer clicker training to train an action like this.
We find it easier to teach a horse to square up using a bridle and snaffle bit instead of a halter. With a bit and bridle, unlike a halter, you can actually communicate through the bit to tell the horse to move one particular leg.
Practice leading nicely and say "whoa". Take one more step after whoa, then stop. You kind of need to give your horse a cue- nonverbal eventually- that you'll be stopping- if you just stop in your tracks they horse is less likely to naturally stop square like you need them to for halter classes.
Remember to stop facing forward, stopping and immediately turning is a cue to your horse to step over. Keep your shoulders square and forward until your horse stops moving. Stop, look over your shoulder, and if your horse is just completely unsquare, say nothing or just say "wrong" softly and go back to walking. If you stop and see your horse has squared himself up, make a BIG deal praising and patting.
If you stop and one leg is stepped up, you can use the bit to signal them to move only that foot back. Because horses back in diagonal pairs of legs, pressure on the right rein affects the right front and the left hind, pressure on the left rein affects the left front and right hind. So if you stop and the horse is square except for having a left hind up under him, apply pressure on the right rein. At first he'll want to back up the right front too, but just ask him to step back up if he does try that, and if/when he only fixes the leg you're asking, praise praise praise. (and if you want to eventually get it on command, make your praise "Good square, good boy square. Square")
Serious western halter competitors train their horses to square up very differently, but this method works well for us and generally a horse knows the command within 3 or 4 ten minute sessions, and most horses we've worked with will now square up at liberty on command- with no halter at all! We believe it ads a bit of pizazz in the ring to have a horse instantly assume the halter stance instead of having to manually place the horse's hooves.