The Croatia international scored five goals in 10 starts for Fulham, but was released at the end of the last campaign. By snapping Petric up on a free transfer, West Ham manager Sam Allardyce has added some much-needed firepower to his side.
Andy Carroll will remain on the sidelines after suffering a setback in his return from a heel injury and the Hammers had Modibo Maiga and Ricardo Vaz Te as their only fit strikers before Petric's arrival.
The 32-year-old has revealed that he agreed to move to Upton Park after talking to Guy Demel, his former team-mate at Hamburg.
"I'm very happy, excited and looking forward to training with the team and to the first game," said Petric.
"I know [the Premier League] and I'm happy to be back in the Premier League, because it's a fantastic league and I'm really looking forward to being part of this team and this club.
"There are a lot of good players here and I'm happy to be part of such a good team and I hope we can all celebrate my first goal for West Ham as soon as possible.
"I didn't speak to Sam [Allardyce] until today but I've heard a lot about him and I spoke to Guy Demel, who I know from my time at Hamburg and I'm sure I'll have a good time here.
"I remember playing at West Ham last year and it was a very tough game for us at Fulham. I think we lost 3-0! It's not easy to come here [as the away side] and take points away."