With a UTI what should I avoid? What food? And could I take a pain killer? If so what kind

Spicy foods, caffeine. Acid urine producing beverages & foods such as oj, tomato sauce etc. Drink plenty of water. Pyridium (phenazopyridine) can relieve burning & Ibuprofen in adequate doses can relieve pain. Good luck.
Uti's & food. Uls are not aggravated by diet, however painful bladder syndrome may be. These folks should avoid acidic foods and stay well hydrated.