half of budgets for pharma companies is spent on marketing. Discourage that and they will be forced to spend more on R&D.
You can pass a law to ban pharma commercials on the grounds that prescriptions should be prescribed by doctors. You could also simply tax marketing spending as though it were the same as profits, applying corporate taxes to marketing spending.