They made a bright start to the match, taking the lead after just four minutes when Daniel Vidot touched down in the corner to finish off a sweeping move.
France were level shortly after the half-hour mark when Morgan Escare went over for the hosts for a stylish try following some slick passing.
© Getty Images
Anthony Milford restored his side's lead six minutes after half time when he danced past three French defenders before scoring under the posts, making it easy for him to convert his own try.
Jean-Philippe Baile thought that he had pulled his side back into the game when he crossed the white line, but the video referee ruled that he did not manage to get the ball down.
France then failed to take advantage of indiscipline in the Samoan ranks, and they were punished with 20 minutes left when Pita Godinet spun away from his man and scrambled over the line.
They weren't to be denied for much longer, however, as Junior Moors powered over with six minutes remaining to clinch second place in the group for his side.
France will now face the tougher quarter-final draw on paper as their third-place finish sees them take on Group A runners-up England in the knockout rounds.