[F]

I have a 1/2 " gas line coming into my kitchen of my new house. I bought a 1/2" shutoff valve, 3 " Nipple, and 1/2" cap. In order to connect to a flex line I assume the nipple needs to come out of the shutoff valve (F/F Threads). Give me some guidance as how to install the line. I also bought some pipe thread compound. Please put in order the steps and tools required.

Thanks