This is revisionism at its worst.  Pope John Paul II excoriated capitalism as much as he did communism.  Both economic systems see workers as means and not ends, and thus are inherently immoral.  Please read his encyclicals.