The Hammers were gifted an early lead when Mark Cousins' attempted clearance ricocheted off Cole and into the net, and they doubled their lead after the restart when Collins headed home Cole's corner.
Substitute Jabo Ibehre headed in a stoppage-time consolation for Colchester, but it proved the last action of the match.
West Ham boss Sam Allardyce fielded a strong field for the trip up the A12, with summer signing Adrian in goal and veteran Romania defender Razvan Rat also in the starting line-up.
And the visitors got off to a dream start on seven minutes when goalkeeper Cousins' clearance bounced back into his own net off Cole.
Colchester responded well to that early setback, with Clinton Morrison forcing a fine save from Adrian and Gavin Massey curling a low shot just wide.
Cousins denied teenager Elliott Lee just before half-time but he was beaten again on 50 minutes by defender Collins' powerful header.
Colchester gave their fans something to cheer about in injury time when Ibehre headed Tosin Olufemi's cross past Adrian, but it was too little, too late.
West Ham will now travel to Germany for a training camp which includes games against Mainz and Hamburg.