Buying shares of stock is just another form of gambling disguised as investing. The only difference is that you can do some research into your purchase to determine if that is a good idea to make the purchase. The only real difference is that you can look into your "investment" to see if you think you are making a good bet.
Even then, with research you are still only guessing that the price goes up, or that you are buying at a low price, it is just a form of gambling