Open up the image you'd like to use, I'll be using this one:
Type your text, it doesn't really matter what color the font is.

You can add any shape to the text if you'd like. To do this, you must have your text selected, then find this icon at the font's tool bar
.

Once you're done with that, you will have your layers like this:

Drag the font's layer to the bottom. You will now have something like this:

Hold "ctrl" and click the font's layer to select it:

Now click the image layer once, and then click this button:
located at the bottom of the layer's panel.

Merge it by right clicking the image (not the font's layer) and select the "Merge Visible" option. Crop it and save it as a .png file.
