Pope Pius XI
Quadragesimo Anno §35
Quadragesimo Anno: On Reconstruction of the Social Order
35 This second method has especially been adopted where either the laws of a country, or certain special economic institutions, or that deplorable dissension of minds and hearts so widespread in contemporary society and an urgent necessity of combating with united purpose and strength the massed ranks of revolutionarists, have prevented Catholics from founding purely Catholic labor unions. Under these conditions, Catholics seem almost forced to join secular labor unions. These unions, however, should always profess justice and equity and give Catholic members full freedom to care for their own conscience and obey the laws of the Church. It is clearly the office of bishops, when they know that these associations are on account of circumstances necessary and are not dangerous to religion, to approve of Catholic workers joining them, keeping before their eyes, however, the principles and precautions laid down by Our Predecessor, Pius X of holy memory. Among these precautions the first and chief is this: Side by side with these unions there should always be associations zealously engaged in imbuing and forming their members in the teaching of religion and morality so that they in turn may be able to permeate the unions with that good spirit which should direct them in all their activity. As a result, the religious associations will bear good fruit even beyond the circle of their own membership.
Source: Quadragesimo Anno (Vatican.va)