@MarcoGiammarini
What volume of product are you building? If you're talking in the hundreds at a time then I would recommend getting the MCUs pre-programmed before they're soldered to the PCB.
Your board manufacturer should have relationships with companies that do that as it saves them money and hassle and is a higher quality process.
As @ErichStyger indicates there are quite a few ways to do the programming on the line, but eliminating that manufacturing makes sense in terms of cost, product turn around and quality.
myke