There is a product called a Masterplus...available from a few places in the UK, the place I got mine from is called British dog.
It is made up of a collar that contains a cannister of compressed air & a remote control for you to activate the unit on the dogs collar to emit a shot of freezing cold compressed air under the dogs nose everytime it goes to eat a pile of sh*t.
The good thing is that you can activate it from quite a few feet away from the dog, so you have total control of your dog. It also doesn't hurt the dog in anyway...just surprises it & makes it believe that the sh*t (or whatever you use the unit for) is actually making the explosion & the dog will quickly conclude that it should avoid all turds just incase they explode!
You must use it carefully & responsibly, but I've found it to be invaluable at sorting out dogs behaviour without using any punishment...and they don't associate it with you, they usually look up with a bewildered look on their face & you can then use that as an oppportunity to call the dog back to you & praise him for not eating the sh*t.
The cost of the thing seems quite a lot (�160) but I know that you can rent them too.