There is uncertainty about the information whether Lord Rama worshipped Lord Shiva and installed Shiva Lingam at Rameswaram.
Valmiki Ramayana does not specify to the fact directly.
But it states Rama worshipped Shiva at Rameswaram.
That Rama installed a Shiva lingam is referred to in Adhyatma Ramayana,Shiva Purana,Linga Purana,Skanda Purana, Padma Purana,Ramacharitamanas by Tulsidas and Shiva Daridra Dahana Stotra.
During the construction of bridge, Rama installed Mahadev and worshipped him calling by the name Rameshwar Mahadev. He described his glory, “If someone visits the bridge (setubandh), and prostrates to Rameshwar mahadev he is liberated of the severest of sin of killing Brahmins.” Rama stated, “One should bathe here in sea, and having darshan of Rameshwar Mahadev, he should go to kashi, to fetch ganga water. Offering the Ganga water of Kashi over Rameshwar Mahadev, he should throw the pot in sea. Thus, he is bound to get salvation.”
Reference in Shiva Daridra Dahana Stotram” composed by Rishi Vasistha.
“Ramapriyaya Raghu nada Vara Pradhaya,” meaning “Who is dear to Rama ,Who granted boons to Rama’
राम बचन सब के जिय भाए। मुनिबर निज निज आश्रम आए।।
गिरिजा रघुपति कै यह रीती। संतत करहिं प्रनत पर प्रीती।।
बाँधा सेतु नील नल नागर। राम कृपाँ जसु भयउ उजागर।।
बूड़हिं आनहि बोरहिं जेई। भए उपल बोहित सम तेई।।
महिमा यह न जलधि कइ बरनी। पाहन गुन न कपिन्ह कइ करनी।।
Source.The Lanka Kanda 1st Dohas