About critical points of the energy in an electromagnetic shaping problem