A man pretending to be the patient would go into the pharmacy and pick up the prescription, the records say.
The pharmacist became suspicious after repeated visits by the man and called the doctor whose identification number was being used.
Police were called when the pharmacist discovered the names of the nurse and the patient were fictitious.
Investigators discovered that the woman who had been calling in the prescriptions had worked for the doctor but had been fired three years ago, court records state.
Pharmacists at CVS Pharmacy, Pattersons Drug Store and Wal-Mart told police the two had used the same methods to obtain painkillers from their stores between May and July, according to court documents.
The woman believed to have called in the prescriptions had already been arrested in Morgan County but refused to answer questions when interviewed by Martinsburg City Police, court records say.
Police said the woman, Sharon Kessler, went by the alias Sharon Ward and is wanted in Montgomery County for narcotics fraud.
Craig Ward and Sharon Kessler were arrested July 31 in Morgan County on charges of obtaining a controlled substance by fraud, West Virginia State Police Trooper C.E. Platt said.
Craig Ward posted bond on the charge and was released and Kessler was held in the Eastern Regional Jail, Platt said.
Conviction on a prescription fraud charge carries a maximum penalty of four years in prison and a $30,000 fine.