The deal runs to 2019 and includes the option for Totti to join the technical staff once he hangs up his boots.
"It's a lifestyle choice," said the midfielder. "I think this contract comes from what I have shown on the field. Out of respect I had towards the Sensi family, to my companions, the coach and fans, I signed it.
"The Ballon d'Or? If I had gone elsewhere I would have won it. But I'm so happy because I made a choice from my heart."