It's in essence all about forces. Gravity is 1G force pulling us down to the surface, as in F=m*a. When free falling all objects will accelerate with approximately 9.8m/s^2 (varies a bit across the earth), until terminal velocity (which is just air resistance building up to an equilibrium with gravity).
If that object suddenly stops, it experiences a force to take away the momentum. Depending in how short a distance it stops/stopping time will lead to an acceleration applied, which in turn is a particular force in Newton. For example, 100G would be 980m/s^2 of acceleration, on a 1kg object is 980Newton. That is more or less the same as 100kg at gravity (1G). For imagination purposes it is often expressed as "as large as weighing X kg for a brief moment".
You could fake the Newtons by using gravity and have something pulling on it, but I think you need to have a very clever mounting system to apply it in a good way. Also, force/speed/acceleration is not scalar but a vector, and can be applied in 3 dimensions. In addition; "shock" implies a very short trauma, not extended periods of time (milliseconds vs seconds).
Honestly I wouldn't really know how to "reliably" test it. You do have those vibration tables, but we often only use those to see if screws & board assemblies remain fixed during transport/shaky equipment usecases. Maybe there are similar pieces of test equipment for shock.
Or you can just overengineer the crap out of it
Not sure, but I think large (especially tall components) are better to be fixed through hole than SMT. I still prefer through hole USB connectors over SMT USB connectors for that reason.
I've also had some large SMT aluminium caps "fall" of a PCB once when the board felt on the ground. So I guess those are also a worry point.