I know that Shri Rama is God , then why did He worship Shiva Linga in Ramayana?
Lord Rama was never mentioned as a god in Ramayana. If you've ever heard Rama as god, it is just because of his godly nature and for his golden era of ruling the kingdom, but not because he is god. The avatar of Rama is human and so, he faces so many difficulties. The intention in Lord Rama worshiping Lord Siva is that "god-told" Rama worshiped a god (here it is Siva) when he is in hard situations. It is to impart a faith in god when you are facing hard situations.