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.
If he's the owner, that's most likely true. However, if he's just an employee and filling all scripts is part of his job, then his employer has every right to fire him.
From the pharmacist's POV, the script was to be used to commit an immoral act.
If this were her gun instead of her script, he would have no right to keep it if he knew she intended to commit an immoral act with it? That would be stealing?