To run riot means to get out of control, which is what her thoughts did when she started working for him and thinking about him.
Consider the staetement "Working for him made her thoughts run out of control with images of him.". Based on this statement, is "Working for him made her thoughts run riot with images of him." a true statement? Yes/no/unknown