Saints confirmed the move a few hours after the Dons announced the wide midfielder's contract had been cancelled by the club.
The 22-year-old joined Aberdeen in the summer amid interest from several Scottish Premiership clubs but most of his 10 appearances came from the bench.
The left-sided player left Rangers, where he made almost 50 first-team appearances, when they went into administration in February 2012 and soon joined Bolton.
But he failed to make the breakthrough with Wanderers and his only senior experience in England was during a loan spell with Bury.
- Sports & Recreation