The leg press machine is actually a better choice.
Shorts are perfectly fine as long as you wear appropriate underwear to spare your fellow gym patrons from unpleasant sights while you lie down in the leg press machine.
The adductors, or the inner thighs work to stabilize the knee during the leg press movement and the hamstrings provide dynamic stabilization.
Since the leg press is a closed-chain exercise, some fitness trainers consider it preferable to the leg extension machine.
Like the squat rack, the leg press machine is often available as either a free weight station or a selectorized weight machine.