The proposed methodology is based on the use of the adaptive mesh refinement (AMR ) techniques in the context of 2D shape optimization problems analysed by the finite element method. A suitable and very general technique for the parametrization of the optimization problem, using B‐splines to define the boundary, is first presented. Then mesh generation, using the advancing frontal method, the error estimator and the mesh refinement criterion are studied in the context of shape optimization problems In particular, the analytical sensitivity analysis of the different items ruling the problem (B‐splines. finite element mesh, structural behaviour and error estimator) is studied in detail. The sensitivities of the finite element mesh and error estimator permit their projection from one design to the next one leading to an a priori knowledge of the finite element error distribution on the new design without the necessity of any additional structural analysis. With this information the mesh refinement criterion permits one to build up a finite element mesh on the new design with a specified and controlled level of error. The robustness and reliability of the proposed methodology is checked by means of several examples.