The present invention relates to a composition comprising one or more vinylformamide/vinylamine copolymers, one or more fixing polymers other than vinylformamide/vinylamine copolymers, one or more nonionic surfactants chosen from oxyalkylenated, preferably oxyethylenated, fatty alcohols, and one or more cationic surfactants. The present invention also relates to a process for styling keratin fibres, comprising the application of this composition to said fibres, and also to the use of such a composition for shaping the hair.