Pharmacy messed up my prescription

It sounds like you are trying to rationalize keeping something that’s not really yours, as a windfall. I don’t think that’s wise in this case.

The right thing to do is to return the excess. This would present you to the pharmacy as being honorable. Failing to do so may present you as being an untrustworthy coveter of controlled substances, certainly not a reputation I would desire – especially if I depended on such substances to make my life better.

Whether or not someone at the pharmacy faces consequences is not your concern, other than the possibility that the consequences may be less if the pills are recovered. If that’s the case, it’s basic human decency to return them.

Whether or not the returned pills get thrown out is not your concern. There are bigger issues here than waste.

Returning pills you haven’t paid for and being forthright with the pharmacy will serve you well in the long run.

These are capsules, right? Dump the contents into a plastic bag, fill the capsules with baking soda and take them back to the pharmacy. At bedtime, lick your finger and stick it into the bag to get a dose.

(As much as it pains me to do so, I’m obligated to say that what I just wrote was a joke, and that you shouldn’t do that.)