A pricing law?
Something... something... free market...
Why limit this to pharmaceuticals? How about groceries? Housing? Appliances?
Groceries:
SNAP, farm subsidies, discount outlets, food banks, grow your own.
Housing:
Section 8, rent control, move to a low COL area.
Appliances: The vast majority of appliances in rental units are supplied by the landlord. Buy them second hand at flea markets and garage sales. At some level, many appliances are convenience items, almost luxury items. Think: dishwasher, toaster, microwave.
It's not illegal to share food, housing, appliances (ever borrow something from a neighbor?)
It's illegal to share prescription medication.
In all the above categories, except doing without all food, you can choose not to buy these things and it isn't an automatic death sentence. With Type 1 diabetes, without insulin, you will quickly die. Insulin has been around since the 1920s. Yet it is still under patent! This is due to insignificant changes in insulin and delivery systems, creating new patents, allowing the price gouging to continue ad infinitum.
There is no "free market" when it comes to pharmaceuticals or anything in medicine. If you have a heart attack or cancer, you can't shop for the cheapest doctor, procedure, hospital, medication, or imaging facility, because no one tells you the price up front. Heck, they don't even know the price! It's hidden from the providers by layers of and insurance company and health care system contracts.
A free market requires open competition, and the ability to negotiate prices. Laws of supply and demand do not apply here. There is plenty of supply but the drug companies can charge whatever they want. However, they are charging so much that in some cases they literally kill off their customers because of inability to pay. It's stupid, but they do it anyway.