On a fixed domain approach for a shape optimization problem