Just say "No, thanks." and keep on walking. 95% of the time this is enough and the end of the issue for me at Wal-Mart, Frys, and others.
Occasionally they will insist, saying "I have to/am supposed to check your receipt, sir!" and I reply with "I am not responisble for your flawed policy--I bought and paid for these items, I own them and the receipt, and I do not have to show them to anyone."
It's never gone past that, but if pressed and asked to stay for a manager or LP person, I would comply but also would not let them search it either. I would offer to stay until police arrive, and at that point they can explain to the police why they are detaining me, exactly what I have shoplifted and exactly where I am concealing it, and that would give the police probable cause to search me. In most states that info is required for a "good stop".
If instead of asking me to wait, they laid hands on me, that would first cause a loud, attention getting, accusation. If they persisted it would be treated as and responded to as an assault--because it is.
Note that at Costco, I believe that agreeing to the checking of the receipt is part of the agreement you sign when you buy your membership. If you don't like it, don't get a membership.