Firms can donate a share of profits to charity as a form of corporate social responsibility (CSR). Recent experiments have found that such initiatives can induce higher effort by workers, generating benefits for both sides of the labour market. We design a novel version of the gift-exchange game to account for self-selection, and find that wages remain the most effective incentive to attract and motivate workers, with corporate donations playing a smaller role than previously suggested. We also show that firms substitute donations to charity with lower wage offers, keeping their profits constant but reducing workers' earnings. Initiatives of corporate philanthropy can thus be marginally beneficial for firms, but considerably costly for workers.