Fernando Alonso has signed a new contract with Ferrari that will keep him at the Italian team until 2016.