The moment-SOS approach (SOS=‘sum of squares’) is a general metho- dology for solving optimization problems described by polynomials and compact semi-algebraic sets. In fact this methodology also applies for solving the Generalized Moment Problem (GMP) with polynomial data, of which polynomial optimization is only a very special instance (and even the simplest instance). The validity of this approach is guaranteed by powerful positivity certificates (Positivstellensätze), bre- akthrough results from Real Algebraic Geometry obtained in the 1990s. We will first introduce the positivity certificates and then describe the moment-SOS approach for optimization. If time permits we will also briefly describe its application to some other applications outside optimization (as instances of the GPM with polynomial data).