It is an unsound plan to shim the top of a stand that is not co-planer. Any stress point at all will be transfered to the tank, and the tank will suffer for it. The proper fix for a stand of which the top is not co-planer is to make the top (the lumber members) co-planer, flat, and square.
This is the problem with lumber stands, and why plywood stands are the best option for those lacking skills and equipment. They need equipment that can deal with the crook in the lumber pieces, or know how to deal with the crook, or the stand will usually come out not co-planer; the tank rocks, or you wind up with a twist in the stand. These issues are not adequately dealt with by shimming the top.
The other problem with lumber stands, is the lumber memebers themselves change dimensionally between the time you cut them, and the time you assemble the stand. This is due to ambient temperature, and humidity changes.
The cure for the issues caused by the crook is a bench jointer, or ripping your 2 bys from 2 x 8 or 2 x 12 stock, or both. The cure for dimension changes is cut and assemble immediately, as well as precise measuring and cutting. Accuracy is not as critical as precision.
In short, the "don'ts" of stand correction are: Never shim the top of a stand. Only shim the bottom of the stand, to correct the level of the stand tank. Never use foam to correct an out of whack stand rim/top: as already pointed out, it doesn't work. (Never put foam under a rimmed tank either.)