Drugstores have a reputation for notorious markups, but if you know which products to buy and the best coupons to use, you can actually save more than you would have thought.

First, let’s talk rewards programs

Rewards ProgramsJonathan Weiss/Shutterstock

The most important step toward getting the best prices at drugstores is signing up for your preferred store’s rewards program. The big three are Walgreens Balance Rewards, CVS ExtraCare Pharmacy & Health Rewards, and Rite Aid Wellness+ Rewards. With each of these programs, you can earn credits or points by making purchases, refilling prescriptions, and (as is the case with Balance Rewards) even logging your fitness activity, weight, and blood pressure. The more points you rack up, the bigger discounts you’ll get at the cash register, whether in the form of a percentage off your purchases or money back to use in-store or online.

Saving more means spending more

CVS pharmacyJeff Bukowski/Shutterstock

Whichever drugstore rewards program you sign up for (or maybe you’ll sign up for all three!), get ready to become a frequent shopper there. It may take a few shopping trips to start collecting enough rewards points to save the most money, but you’ll end up with lower prices in the long run. Brandice Taylor-Davis of The Taylor-Davis Agency found success with CVS’s rewards program. “The trick is, the more you buy certain items through your ExtraCare card, they send you more coupons and savings for those items which are almost always in conjunction with an advertised sale. So yes, the laundry detergent is $18, but you can walk out the door paying $8 with $10 in CVS bucks to purchase your toilet paper for free. So you just paid $4 for the detergent and $4 for the toilet paper. That’s certainly a win to me.” Make sure you’re aware of these things you should never buy at drugstores.

Gift cards

Gift cards at walgreensSorbis/Shutterstock

They’re the perfect gift for the person who’s tricky to shop for, and they can also get you some cash as well. Buying gift cards at drugstores won’t directly save you money, says Dustyn Ferguson of dimewilltell.com—meaning that $40 gift card to Olive Garden will still cost $40—but it can get you rewards points for future purchases. Just double-check which gift cards qualify. Drugstores usually carry gift cards from national brands of all sorts, like restaurants, department stores, movie theaters, and more.