The present invention relates to a process for treating the hair, which comprises: a) the application to the hair of a composition comprising one or more polymers containing a silicone unit bearing alkoxy-(aminomethyl)-silyl functional groups, b) the application to the hair of steam by means of a device that is capable of generating steam, step b) possibly preceding, following or being simultaneous with step a).