Barcelona have signed Wojciech Szczesny as a free agent, the LaLiga club said on Wednesday after the Polish goalkeeper reversed his decision to retire and come to the team's aid after they lost Marc-Andre ter Stegen to a long-term injury.German keeper Ter Stegen underwent surgery after suffering a rupture of the patella tendon in his right knee over the weekend and he is expected to miss the rest of the season.Inaki Pena, 25, is expected to cover for Ter Stegen but Barca have now reinforced their squad with Szczesny, who had announced his retirement last month after terminating his contract with Serie A side Juventus.The 34-year-old former Poland international had one more year left on his contract at Juve, where he had replaced Italy great Gianluigi Buffon in goal.Szczesny won the league and domestic cup three times each in more than 250 appearances for Juve but lost his place to close-season recruit Michele Di Gregorio.Barcelona are top of the LaLiga standings with 21 points from eight games and Hansi Flick's side next visit Deportivo Alaves on Sunday.