Copper tape is good in a pinch also. And works pretty well. Even under or over cardboard (under is often best /better from a grounding point of view, you can also make a little square under where the connector exits) You can coat cardboard with copper tape, then cut it to size, then put the box together and add small dabs of solder (this is when the copper is on the inside of the box so the outside looks ugly) to get it to hold its basic shape, see if the PCB fits, if it does then add more solder and the RF connectors. Ive recently used the type of RF connectors that combine both edge mount PCB and a longer SMA (they look odd because the SMA is so long) so there is both a PCB connection and an around the egress type connection. This kind of design is not particularly good looking (unless you could find good looking cardboard) but it is functionally fine, as long as the equipment stays indoors. Ive tried using foam core and foam core is great for antenna prototyping (its dielectric constant is "1") but for obvious reasons foam core is not good for boxes that need more than just the tiniest amount of actual soldering. So - no good for RF boxes you want to solder to give them better connectivity. The foam melts. Use cardboard.
The big plus is that doing this you can make your box the perfect size for your PCB, so it fits snugly. This may improve some devices performance.
Adding a box thats too big conversely may degrade performance.