Ah yes, 'recycling'! I foster for a rescue group and it is common in rescue dogs. There are many causes.
The best thing, and the only thing that I have found that works consistently, is black licorice. It has to be black licorice though, no other color. Basically the naturally occuring ingredient in licorice that gives it that characteristically sweet taste turns bitter when it is digested. Bitter poop = no poop eating.
I just get the black Twizzlers at the grocery store. About 1/3 to 1/2 of a piece once a day should do the trick, although it may take a few days for it to work. Some dogs learn the lesson immediately, and you can discontinue the licorice after a few weeks. Some never learn and need to be on it indefinitely.
One caution though- do not use this in an older or sick dog without checking with your vet. Licorice is also a natural diuretic and can mess with electrolyte levels in older or ill dogs, leading to heart, liver and kidney problems. I have to say though, in all my years I have never had a problem giving licorice. And I've never had a dog that didn't like it- even the fussiest dogs love their licorice 'treat'.
Other things that may work are: pineapple, spinach, meat tenderizer, and OTC powders from the pet store. All these work on some dogs, but black licorice is the only thing that works on them ALL! Hot sauce never worked for me, my dogs seem to enjoy their special servings of 'buffalo-style poop'!
The only other thing guaranteed to work is following your pup around, waiting for him/her to do their 'business', and picking it up immediately.