PSA: if you do stop to talk to someone at the supermarket, don’t do it in the middle of the fucking aisle. Between you, your friend and your respective carts, you create an obstruction for everyone else who just wants to get their damn groceries and get out.
If you saw them multiple times, they almost certainly saw you. And realised that you were avoiding them. If you see someone you don't want to talk to just say "Hi, sorry can't stop to chat, I'm in a hurry." and move on. Much less awkward for all involved.