<p class="Default">Nowadays, the use of the wind energy has known an important increase because it is clean and cheap. However, many technical issues could occur due to the integration of wind power plants into power grids. As a result, many countries have published grid code requirements that new installed wind turbines have to satisfy in order to facilitate its intergration to electrical networks. Among those requirements, the wind farms must be able to participate to ancillary services for instance voltage regulation and reactive power control. Nevertheless, in case of small wind farms having not the necessary reactive power capability to contribute to reactive power support, Flexible AC Transmission Systems (FACTS) devices could also be used to participate to reactive power support. In this paper, an optimization method based on particle swarm optimization (PSO) technique is presented. This method allows getting the optimal location and reactive power injection of both wind power plants (WPP) and synchronous var compensators (SVC) with the objective to improve the voltage profile and to minimize the active power losses. The IEEE 14 bus system and a 20 MW wind farm based doubly fed induction generator (DFIG) are used to validate the proposed algorithm. The simulation results are analysed and compared.</p>