Acc. to Shivpuran, Shivji is the supreme God who created both Vishnu and Brahma. Later, he took an avtaar as "Rudr" from between the eyebrows of Brahma .
Yes, Ramji worshipped Lord Shiva. In Shivpuran it's also said that Ramji did a tapasya for a year and got a boon from shivji that he will take an avtaar in form of hanuman and help him in his mission. It was impossible for Ramji to kill Ravan because he was a Shiv Bhakt. But when Ravan became arrogant and got many powers, Lord Shiva himself in form of hanuman helped ramji to kill Ravan...It's believed that when Ramji created a "Shivlinga" in Rameshwaram, there was nobody except Ravan who could do the ling pooja and hence he was called. Ravan did come and performed Shiv pooja there for Ramji..
I also read in Shivpuran that Ramji, Laxmanji and Hanumanji were barred from doing shiv pooja after they killed ravan , meghnath because they were brahmans. ramji and hanumanji took a dip in some sacred river after killing ravan which purified them n Shivji forgave them.