There are several theories on the relationship between the island and the two stories Pi tells at the end of the book. Basically, it boils down to whether you choose to believe the first or the second story. Regardless which version you choose to believe, Pi survived, and the two stories are the same except for the allegory and symbolism.
One belief is that Pi felt it necessary to create the first story in order for him to be able to cope with the actual, horrific events of the second story. Richard Parker is Pi's darker side, the side he must allow to rise to the surface in order to survive. The tiger jumps from the boat and is never seen again, just as Pi's darker side returns deep within Pi, never to surface again. Richard Parker may also have been a way for Pi to deal with his loneliness. Each animal is symbolic of the human characters in the lifeboat, and the island with algae is a metaphor for the raft made from oars and life jackets. In the beginning, the island is a safe haven from the dangers in the lifeboat, providing Pi with food and shelter. It also symbolizes Pi's despair toward the end of the book, and the carnivorous vegetation stands for his pessimistic belief he will ever be rescued. Staying on the island would mean Pi is giving up, deciding to end his life on a man-eating island. Later, Pi realizes he must return to the boat to face his fears and hold onto whatever hope he can that he'll survive.