Step 1. Using the Rectangle Tool (U) draw your vector rectangle where you want it, adjust the size color etc (I'm guessing you can do that).
Step 2. Using the Type Tool, add your text to where you want, size it up to the right size, position it and pick the font you want, color does not matter.
Step 3. Now that your text is exactly how you want it to look, other than being transparent, go to your Menu bar and choose Layer > Type > Convert to Shape. This now turns your editable text into a Vector Shape, in Photoshop you can no longer edit the actual type (change the font, add words etc).
Step 4. Using your Path Selection Tool (A) (Solid Black Arrow), select all the characters in your text. I just click and drag around the lot of it so it selects them all.
**Note - I don't know the tech terms for this, but you need to have the Vector Shape selected so there is a 1pt line wrapped around each of the shapes. If you click in the Layers Tab on the Vector area, you can click this feature on and off.
Notice the black line around the text
This is how it looks in your Layers tab, both layers are vectors, but one has the vector area selected.
Once you have that figured out and you use your Path Selection Tool, this is what you will see:
Notice that all the points in the vector shape are selected.
Step 4. Now that you have the text selected, you will need to do a Copy/Cut of the selection. So, Apple + C, then Apple + X. When you do this you will get a popup dialogue asking which to delete, the top selection is default and this is what you want. Now your text is gone.
Step 5. Using the same selection process as Step 3, Path Select the rectangle that you created in step 1. Now Paste (Apple + V) You will now see the point paths of your text appear over your rectangle, but will all be the same color. Don't unselect or anything, leave it be.
Step 6. Now go to the Menu bar and select the option below. I don't know the terms for it. You will click on the 'Subtract from Shape Area' button, 2nd from the left.
When you select this, if you had your text paths selected, you will now have a transparency where the text is, allowing you to see the image below.
I hope this wasn't too muddy for ya to understand, it's a simple process once you learn how to work with Vectors in Photoshop.