An optical module includes an active optical component, an optical fiber, a beam shaping optical component and a positioning device. The optical fiber is arranged with respect to the active optical component to be capable of propagating light along an optical path between the active optical component and the optical fiber. The beam shaping optical component is located in the optical path between the optical fiber and the active optical component. The positioning device is for moving either the beam shaping optical component with respect to the optical fiber, the beam shaping optical component with respect to the active optical component, or the active optical component with respect to the optical fiber, or a combination.