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): R1Si(OR2)3 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 first surfactants chosen from anionic surfactants, and—one or more second surfactants chosen from nonionic surfactants, amphoteric surfactants and zwitterionic surfactants. The invention also relates to a cosmetic treatment process using the said composition. This composition can be used in particular for haircare and skincare.