Variational Methods in Shape Optimization Problems