This paper presents a machine-learning-based approach that enables simultaneous surrogate modeling and dimension reduction and applies it to aerodynamic parametric shape optimization. Aerodynamic shape optimization is a crucial process in various industries, including aerospace, automotive, and renewable energy. It involves iteratively improving the properties of a system by evaluating an objective function and driving its minimization or maximization using an optimization algorithm. However, the evaluation of aerodynamic objective functions requires computationally expensive operations, such as solving complex fluid dynamics equations and calculating performance metrics like lift and drag coefficients. This computational cost becomes particularly burdensome when derivative-free optimization algorithms need to evaluate numerous samples per iteration. Additionally, when the design space dimension is high, the efficiency and effectiveness of the optimization process decrease. To address these challenges, the paper proposes combining surrogate modeling and dimension reduction. Surrogate modeling constructs a reduced order model that approximates the coefficients of interest in a cost-effective manner, while dimension reduction identifies the most relevant design space dimensions using techniques like Proper Orthogonal Decomposition. The paper suggests an integrative approach that employs Artificial Neural Networks (ANN) and Unsupervised Learning, specifically AutoEncoder networks, to simultaneously build a surrogate model and reduce the problem dimension. This technique is applied to optimize the shape of an airplane wing aerofoil under trans-sonic flight conditions. The wing shape is parameterized using Free Form Deformation (FFD). The paper demonstrates that the suggested approach enables rapid and effective shape optimization.