Hi,
For mild scalp folliculitis, an antibacterial shampoo e.g. cetrimide may help.
More severe and bothersome scalp folliculitis causing significant pain and discomfort may require oral medication such as doxycycline or low dose isotretinoin.
A full assessment by your doctor will help decide which treatment may be best suited for you.
Hope this helps!