The 30-year-old was released by Sam Allardyce's side after scoring two goals in 29 appearances last season but has signed a new contract until January 13, 2014.
The 30-year-old was released by the club at the end of last season but has been training with Sam Allardyce's side prior to signing the short-term deal.
"I'm in an excellent mood, am happy to be back and can't wait to get working with the lads again and start my season off," Cole told the club's official website. "I've been working hard with the strength and conditioning coach Mathew Monte-Colombo in the gym and he's been really hands-on with me to get me up to standard to train with the team and get my match-fitness up as quickly as possible with a view to signing.
"I feel fit and raring to go and it's time to start knocking on the manager's door to get some games under my belt."
Cole, who had a trial with Ligue 1 side Saint-Etienne in the summer and was also linked with a move to QPR, scored two goals in 29 appearances for West Ham last season.