1.Open new document

Open new document, Write any word.

1

After that open an image.

2

2.Process

Copy the image.
Now, press Ctrl + Click on thumbnail of text layer, So you’ll have a dotted line around the word.

3

3.Final step

Go to Edit > Paste special > Paste into. You’ll have a text with background like this.

4

You can change the size of image by Ctrl + T.