TMI sorry I scribbled out what I could

so everytime I shave or dont shave in this case I haven't because of this specific reason.... so I get these pimple like bumps they have white heads some are just red. & it hurts when I'm having sex because they're irritated. my dr said nothing to worry about but obviously its annoying when I keep getting them & very uncomfortable. anyone suggest anything??

I get them on panty line area & where my thighs rub.