How to write code for temperature proportional?

Hello, What is the procedure for writing code for temperature control proportional?