Lionel Messi has signed a two-year contract with French football powerhouse Paris St Germain, with an option for a third year, the club said on Tuesday.