"I am pleased to be able to welcome Guillermo to Upton Park," said West Ham chief executive Scott Duxbury. "I was determined to deliver the extra attacking options that Gianfranco wanted for the new season.
"He understands what we are trying to achieve and his high level of European and international experience will be invaluable."
Franco is set to link up with his new team-mates for the first time on Thursday but it is not yet certain if he will be involved for the Hammers in their home fixture with Liverpool on Saturday.
"This is an important team with great players and a great manager," said Franco. "I know that the club are very ambitious and want to do well.
"I want to do my best to make that happen and I am excited about the challenge."
Franco, who represented Mexico at the 2006 World Cup, joined Villarreal from Mexican side FC Monterrey after starting his career in Argentina with San Lorenzo.
He played six times for the Spanish side in the Champions League last season, including the 1-1 home draw with Arsenal in the quarter-finals.
He has also previously played at Upton Park against the Hammers, for Villarreal in the inaugural Bobby Moore Cup last year.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.