Don't rely on the foam to correct the tilt. If you use foam, the foam should go under the entire tank between the tank and the stand. If you put foam or something soft under the stand to make it level, the weight of your tank will compress the foam.
Use something very strong and uncompressible to put under the legs of your stand to make your stand level, then go from there.
I always have been nervous about stands that have little feet because they concentrate all of the tank's weight on 4 points, so I ran two 2 x 8" underneath my stand to spread its weight.
Good luck!
gld