The optimization design of structural shapes is fundamentally a problem of solving functional extremum. Traditional variational methods often encounter challenges, such as limited functional types and oscillation in the solution process when solving high-dimensional functional extreme value problems. In this paper, a functional extremum numerical solution method based on physics-informed deep learning (PIDL) is proposed by using the high-dimensional nonlinear mapping ability of deep learning model. The method first embeds the physical information (control equations, initial conditions and boundary conditions, etc.) of the shape optimization problem as regularization terms into the deep learning model, and a loss function based on the objective functional extremum is constructed. Then, a random gradient descent algorithm is used to train the deep learning model, further realizing the solution of functional extremum and optimization design of structural shape. The proposed method is verified through numerical examples of optimizing the shape of surfaces and arch axes, and a comparative analysis is conducted with the computational results obtained from genetic algorithms. The results demonstrate that the method has high prediction accuracy and efficiency for the target task of small samples. As a non-parametric modeling technology, the method is of great significance for solving engineering problems characterized by high data acquisition costs and data collection challenges.