Nicola Miller, 42, of McLagan Drive, pleaded guilty to threatening or abusive behaviour aggravated by racial abuse at the Burnfoot Pharmacy on March 30.
Depute fiscal Fiona Hamilton said Miller had telephoned the shop at 9am, saying she wished her medication to be collected by her brother-in-law as that had happened before.
But the locum pharmacist had said he would require to see a letter and she began shouting and swearing.
He tried to calm her down, but was subjected to a further tirade of abuse from her.
Ms Hamilton said shortly afterwards Miller appeared at the shop and was shouting and swearing again and after she was given her prescription said: “F****** P*** B******”.
The shop manager reported the matter to police and Miller admitted to officers making the comment saying: “He was winding me up and treating me like a junkie."
Defence lawyer Mat Patrick said his client had a prescription for morphine due to spinal problems causing her severe pain.
He added: “The worker was a locum pharmacist and she got upset at the way he was dealing with her and felt he was off hand. She said he kept referring to her supply of medication which she took to imply she was a drug user.
"But her response was totally inappropriate."
Sheriff Peter Paterson said that apart from the racial aggravation, the offence was against someone carrying out their duty in a shop.
Miller, who receives £900 a month in benefits, was fined £200 and ordered to pay £100 in compensation as well as a £10 Victim Surcharge.