How do i make a box that can be seen into but is invisible from all sides but the front?

im looking to make something like this in unreal for VR

i know that for sketchfab they are just making a huge cube thats black or white to cheat it. but i’m looking to make this effect in unreal for VR, i thought about using “portals” or something but it seems more than what i’m looking for. i just wanna make a box that’s invisible from all sides but the front and can be seen into just like the fake ones on sketchfab.

Is there any way to not render the object except from the front? im not even sure what i should be googling, plz send help!

this is pretty much what im after but in unity. but i want to know if the object behind the stencil can break the silhouette of the card its in.