Experiencing shooting pain while dancing should always be a red flag.
If you struggle with pain in fifth position—with the outside of the front thigh in particular, and especially when going from fifth position to relevé—it could be an indicator that you're forcing your turnout.
Turnout should be set at the hip joint, keeping the knee and ankle in alignment. Test your turnout range by lying on your stomach, with your feet, knees and hips in a straight line, resting your forehead on the back of your hands. Gently bend the right knee 90 degrees, keeping your belly touching the floor. (The lower back shouldn't arch at all during this test.)
With the right knee bent to 90 degrees, let it rotate and fall gently over the left leg. This is a rough estimate of your turnout. (Forty-five degrees of turnout, which is common, would be halfway towards your left leg.) Then, allow the knee to fall gently in the other direction, which is an estimate of your turn in. Keep the knee in line with your hip when rotating the thigh throughout the test.
If you test with way more turn-in than turnout, fifth position will be a challenge for you. It could be due to a structural challenge of internal tibial torsion. This is when the tibia (shin bone) is turned in with the feet 'toeing in' (this often manifests as being pigeon-toed).
Unfortunately, having internally rotated tibias and femurs isn't ideal for ballet, given its focus on turnout. Pronating, screwing the knee and tipping the pelvis forward slightly are all common ways that dancers cheat to make their fifth positions look right.
But dancers with limited turnout or who are struggling with pain in fifth position should instead decrease their turnout to match their turnout test, and focus on engaging the six deep lateral rotator muscles that are underneath the gluteal muscles. Your goal should be to develop muscular strength and flexibility, working within your own unique structure while developing the grace and coordination to safely increase the body's movement range.