A composition for treating a keratin material, comprising at least one amino acid surfactant, at least one amphoteric or zwitterionic surfactant, at least one solid fatty acid, at least one starch phosphates, and at least one acrylic thickening polymer. The composition has an improved rinsing speed after application, and is stable over 2 months, with an improved foaming properties, such as density of foam, and foaming volume.