West Ham capture striker Carew
Carew, who has scored 23 goals in 88 internationals, signed after passing a medical on Saturday but will not be available for West Ham's league opener at home to Cardiff City on Sunday.
The 31-year-old is West Ham's fifth signing since they were relegated from the Premier League last season and follows the arrival of Joey O'Brien, Abdoulaye Faye, Kevin Nolan and Matt Taylor at Upton Park.
"I am looking forward to being part of a good team here that will bring this great club back up to the Premier league again," he told the West Ham website.
Carew said he spoke to former team mates who had played under West Ham's new manager Sam Allardyce and heard good things about the former Bolton Wanderers' coach.
"He spoke well to me and I think he is a great manager and I'm very happy to be playing for him and the club," said Carew.
The striker began his career at Rosenborg before spells with Valencia, who he helped reach the 2001 Champions League final and win the 2002 Spanish title, Olympique Lyon.
He joined Villa in January 2007 and scored 54 goals in 133 games for the Midlands club. He was on loan at Stoke City during the second half od last season.