Maybe another way to look at it:
-The woman ends up with a net gain of $50 ($30 worth of shoes and a $20 bill).
- The neighbor shopkeeper ends up with a net $0 (gives shopkeeper $50 for a fake $50, then later gets his real $50 back and returns the fake $50).
- So, if the woman gained $50, that $50 had to have come from the original shopkeeper. He's out a $30 pair of shoes and a $20. He got a worthless fake $50 in return. Shopkeeper => net loss $50
Basic rules of accounting say that it all has to balance. Woman gains $50, the shopkeeper loses $50 and no more. The neighbor is neutral.