Some dogs will stop if you feed them pineapple chunks with their food, so it may be worth a try.
As Kita says the best way is remove her faeces before she gets a chance, as she is a rescue dog, she may have been deprived of food in the past and will grow out of it.