West Ham United have announced Roberto as their first signing of the summer transfer window.
The goalkeeper will join West Ham on a free transfer when his contract with Espanyol expires on 1 July.
The 33-year-old has agreed a two-year deal at London Stadium with the option for another 12 months.
"I consider this step a big step in my career," the Spaniard told West Ham's official website.
"It Is a dream for every player to come here and play in the Premier League."
Roberto spent this season on loan at Malaga. He has also played in Portugal and Greece and featured in the UEFA Champions League.
He joins after the Hammers confirmed another goalkeeper, Adrian, as one of eight players to be released this summer.
Manuel Pellegrini's West Ham will discover their first opponents of the 2019/20 season when the Premier League fixtures are released at 09:00 BST on Thursday 13 June.
Their first confirmed pre-season friendly is against SCR Altach on 11 July.