In QFT when we consider an external leg we use the creation operator to specific the state of a particle. So this is created onshell with this creation operator. But for virtual particles, those that exist for a limited time and are offshell, how can I create those? I ask this because I found that when talking about the Casimir effect people relate quantum fluctuations to the creation of virtual particles.
Virtual particles do not exist for a limited time, they are not off-shell states, and you cannot create those. They are Wick contractions of fields in the interaction picture, in the Dyson expansion of the $S$ operator. They are not particles, and they behave nothing like a particle.