The 30-year-old striker left the club in the summer when his contract expired at Upton Park.
However, it was confirmed on Monday that the former England international has rejoined the Hammers on a short-term deal.
"I've always wanted to prove myself and hopefully, with this second chance at West Ham, I can help the team," Cole told the club's official website.
"That's all I want to do. I want us to stay in the top league where we deserve to stay.
"Hopefully I can play a big part in that with my presence on the field and by scoring a few goals here and there."
Cole spent seven years with West Ham during his first spell at the club.