The present invention relates to a cosmetic composition comprising: at least 0.1% by weight of one or more fatty-chain alkoxysilanes of formula (I) below: R1Si(OR2)3 (I) in which R1 represents a linear or branched alkyl or alkenyl group, comprising from 7 to 18 carbon atoms, and R2 represents a linear or branched alkyl group comprising from 1 to 6 carbon atoms, and one or more surfactant(s) chosen from cationic surfactants and nonionic surfactants, and mixtures thereof. The invention also relates to a cosmetic treatment process using the said composition, and also to the use of the said composition for haircare and skincare.