What Khanjar said, plus two more reasons to pay for your own Costco membership:
Coupons - In most stores, if you buy items that are featured in the circular, you automatically get the discounted price. If it doesn't happen automatically, all you have to do is point it out to the (well-paid, hooray) cashier, preferably before the transaction is completed. The cumulative savings on items I would purchase anyway more than cover the cost of membership.
Rebates - You won't get them using gift cards, and these can also cover the membership fee fairly quickly. We're getting nearly $1k between Costco and AMEX rebates this year. BTW - Costco AMEX card has no annual fee, score!
Finally, the gift-card suggestion does work, but I'd rather shop without the hassle and with a clear conscience. Just speaking for my very own self, not pointing fingers at anyone.