We demonstrate experimentally the condensation of exciton polaritons through optical trapping. The
nonresonant pump profile is shaped into a ring and projected to a high quality factor microcavity where it forms a two-dimensional repulsive optical potential originating from the interactions of polaritons with the excitonic reservoir. Increasing the population of particles in the trap eventually leads to the emergence of a confined polariton condensate that is spatially decoupled from the decoherence inducing reservoir, before any buildup of coherence on the excitation region. In a reference experiment, where the trapping mechanism is switched off by changing the excitation intensity profile, polariton condensation takes place for excitation densities more than two times higher and the resulting condensate is subject to much stronger dephasing and depletion processes.