We introduce shape-memory polymers (SMP) as substrate material for active optical devices. As an exemplary application we build a tunable organic semiconductor distributed feedback (DFB) laser. Hence, we transfer a second order Bragg grating with a period of 400 nm into SMP foils by hot embossing. The composite organic gain medium Alq3:DCM evaporated on the SMP substrate serves as laser active material. Mechanical stretching of the substrate increases the grating period temporarily and triggering the shape-memory effect afterwards reduces the period on demand. In this way, we can adjust the grating period to achieve a broad continuously tuning of the laser emission wavelength by 30 nm.