Go with your girlfriend to the police station, learn what's required for a restraining order, then fulfill those prerequisites and help her get one. Then, if he continues with the bullshit, you can take further legal steps and mess up his life completely.
But, before doing all that, maybe you...