The 35-year-old Scotland internationalist moves to McDiarmid Park after leaving Salford City and has previously played for Ayr United, Dundee United, Cardiff City, Brighton and Blackburn.
He told the St Johnstone website: "I've been lucky enough to play a lot of games for some big clubs and I think that I bring experience in to help what is a young and talented squad here. The first game of the season will be against my old club and I just knew that would happen!”