Pope Benedict is quoted:
546. As we face such serious challenges, we draw encouragement from the words of the Holy Father:
Certainly, the restoration of justice, reconciliation and forgiveness are the conditions for building true peace. The recognition of this fact leads to a determination to transform unjust structures and to restore respect for the dignity of all men and women, created in God’s image and likeness. . . . As I have had occasion to say, it is not the proper task of the Church to engage in the political work of bringing about the most just society possible; nonetheless she cannot and must not remain on the sidelines in the struggle for justice.(Sacramentum Caritatis 89)
The Church as institution doesn’t engage the politics. But the lay people do.
For deeper examination, check an English translation of the 2007 document from the Aparecida Conference.