I have to wholeheartedly agree on not even mentioning shyness. My son was like, social butterfly toddler/preschooler with every person he met in public (much like me, and most of my family). My daughter, quite literally growled at people for some time, and would cross her arms and harumph at people when she was 2 (I can look back on it now and laugh). I had to learn how to navigate all of that with her. I never stuck her with the shy label, or grumpy, or whatever other label, not even as a temporary feeling. Some kids just don't like to talk to strangers, for whatever their reason. And we should honor that, IMO - under 5 is not really the age for compelling even modest social niceties. This is where modeling comes in, IMO, and then discussing it after.
So in your situation, I would do (and have done):
"Sure, she likes stickers, we'll take one. Thank you! " No further explanation to the adult.
To the kiddo, as we left the store (in a bright, explaining voice, not a shaming one): "When someone gives you something like this out in a store, it's usually polite to say thank you. It was nice of her to do that, you really do like stickers!"
And that's it.
My former scowly, growly preschooler, now 6-1/2, will talk a cashier's (or anyone else in range) ear off, and says please and thank you most of the time (in public, at least )...and I think (or hope) that in part it's because I let her mature at her rate (MUCH slower than my preference! lol ), while modeling what is polite, without worrying too much about what other people might think about her or me (this was the hardest part!). As she got closer to 4/5, I gave her options sometimes if she was feeling introverted, like, just smile and nod, or wave, etc. But I still would do the talking for her whenever she needed it (and still do if and when she's in a particular hard place, at 6-1/2), without being apologetic to the person wherever we were.
Believe me, it's a process to get to that place, and while I tried to stay calm and cool on the outside, internally I was a mess about it and spent many an IM chat with friends saying, "I cannot believe how surly my daughter is! It's the opposite of everything I am and stand for!" and they just kept reminding me to model, and not take it personally, and not worry about other people, and remember how little she really was, and that she would grow out of it with firm, gentle guidance but not forcing....and they were right!
FWIW, I was raised that manners, and especially social niceties, are of the utmost importance....so this was a big issue for me to get my mind around, and to trust that it would all come together for her with maturity and modeling was a big leap for me. Thank goodness it has worked!! lol.