Oh, hell, why bring logic into it? Ever heard of context? Okay, Teresa, here goes:
Your original sentence: The woman and her dog went shopping and it bought a new pair of knickers
You will retrospectively note, of course, that you used a gender-laden pronoun - her.
My perfectly logical response. Rewrite (correcting your pronoun on the way) as:
The woman(1) and its(1) dog(2)* went shopping, and it(1) bought a pair of new knickers.
Now, isn't that much more neat and tidy and totally understandable? Why can't all English be as clear and easy to follow, hmmm?
* Although dogs going shopping are definitely a rarity, whichever sex they are. Or so I believe. Well, in New Zealand anyway. And I haven't noticed many ... erp, any ... here in Pommyland, either.