A method for assembling an end-piece of a flexible pipe, the flexible pipe including an inner tubular structure having a central axis (A-A'), an inner ply of tensile armors positioned around the inner tubular structure and an outer ply of tensile armors positioned around the inner ply, the method comprising the following steps: - placing a rear locking collar of the armor plies (24, 25) around the outer ply; - placing a first shaping guide for shaping the folding of the end segments of the outer ply; - folding the end segments of the outer ply rearwards while forming a bend in front of the locking collar, the end segments of the outer ply pressing on the first guide; - folding the end segments of the inner ply rearwards; characterized in that it includes, before the step for folding the end segments of the inner ply rearwards, the placement of a second shaping guide for shaping the folding of the end segments of the inner ply, the second shaping guide being separate from the first shaping guide, the end segments of the inner ply bearing on the second shaping guide after the folding step, and in that it includes, after the folding steps, the following steps: - inserting a front sealing assembly around the inner tubular structure; - placing a vault of the end-piece in the end of the inner tubular structure; - folding the end segments of the inner ply forward to place them around the vault; - removing the second shaping guide; - folding the end segments of the outer ply forward to place them outwardly at the end segments of the inner ply; - removing the first shaping guide; and - fastening an outer cover of the end-piece on the vault, the vault and the outer cover delimiting a chamber between them for receiving the end segments of the inner ply and the outer ply; in that the step for placing the second shaping guide is carried out after the rearward folding of the end segments of the outer ply around the first shaping guide, and before the rearward folding of the end segments toward the inner ply; and in that the placement of the second shaping guide includes the arrangement, around the inner ply, of a front locking collar of the inner ply, the second shaping guide being placed on the front locking collar. - placing a rear locking collar of the armor plies (24, 25) around the outer ply; - placing a first shaping guide for shaping the folding of the end segments of the outer ply; - folding the end segments of the outer ply rearwards while forming a bend in front of the locking collar, the end segments of the outer ply pressing on the first guide; - folding the end segments of the inner ply rearwards; - inserting a front sealing assembly around the inner tubular structure; - placing a vault of the end-piece in the end of the inner tubular structure; - folding the end segments of the inner ply forward to place them around the vault; - removing the second shaping guide; - folding the end segments of the outer ply forward to place them outwardly at the end segments of the inner ply; - removing the first shaping guide; and - fastening an outer cover of the end-piece on the vault, the vault and the outer cover delimiting a chamber between them for receiving the end segments of the inner ply and the outer ply;