The Q and U Bolometric Interferometer for Cosmology (QUBIC) is a ground-based experiment that aims to detect B-mode polarisation anisotropies in the CMB at angular scales around the l=100 recombination peak. Systematic errors make ground-based observations of B modes at millimetre wavelengths very challenging and QUBIC mitigates these problems in a somewhat complementary way to other existing or planned experiments using the novel technique of bolometric interferometry. This technique takes advantage of the sensitivity of an imager and the systematic error control of an interferometer. A cold reflective optical combiner superimposes there-emitted beams from 400 aperture feedhorns on two focal planes. A shielding system composedof a fixed groundshield, and a forebaffle that moves with the instrument, limits the impact of local contaminants. The modelling, design, manufacturing and preliminary measurements of the optical components are described in this paper.