All you need to do is call the pharmacy and put the Rx# into the automated system. You can go pick it up for someone else but need to show that you know them so they will ask for things like their address and date of birth. Not everyone is capable of making it into the pharmacy.
That said, I hope you are just doing a favor and not trying to steal someone's meds. Not only is it probably a felony without their consent and to keep meds that aren't prescribed to you, but they probably need them and might be in a bad place without their meds for a month.