The prescription allows her to do something he considers morally offensive. To you, that's grounds for not filling it, but not grounds for retaining it?
How do you justify this?
She has the right to shop elsewhere.
He has no right to "retain" (steal) her script if he is not going to fill it. In fact it is a crime.
She should have called the police immediately and waited there until they arrived and retrieved her property.
Then she could leave the store and the police could decide whether or not to arrest him.