No and yes. :)
You might think that a company that has vowed to never pay dividends (profit) to their shareholders is a worthless investment. I even hinted as much in another answer on a question about dividends. However, this still doesn’t tell the whole story, because even if a company doesn’t pay dividends now, things might change in the future, in one way or another.
The company may decide in the future that it may start paying dividends. But even if it doesn’t start (or at least doesn’t for the foreseeable future), the shares still represent ownership in the assets of a company.
A company is made up of assets, intellectual property, and people, and all of those things have value. Those things may be sold in the future, and I, as a stockholder, receive a share of those proceeds. The way this works can take many forms. If another company takes over (buys) my company, I may receive cash or new shares in the new company. Or, if assets are sold, my company will have more cash reserves, which I am a partial owner of. Ultimately, if the company closes down, I am entitled to a share of the net proceeds of the final sale (after the debts are paid).
Let’s look at a couple of examples. Warren Buffett famously doesn’t pay dividends for his Berkshire Hathaway company, instead continuing to reinvest the profits in the company. But the shares are far from inherently worthless. Berkshire owns many profitable assets and makes lots of money. Even if Buffett never pays a dividend, his successor might. If he decides one day to close up shop and sell off the assets, there will be cash going to the shareholders.
A contrasting example is the Green Bay Packers. The Packers are a non-profit, community owned football team (unique in American major league sports). At several times in the Packers history, they have sold shares of stock to the community. However, as a non-profit, they will never distribute any dividends to the shareholders. Bylaws stipulate that shares cannot be resold (except back to the team), and any proceeds resulting from the sale of the team must be donated to charity. So, although shareholders do get some voting rights, the stock does not represent any actual equity value in the team. The stock certificate really is little more than a worthless piece of paper, although many sports fans in Wisconsin prefer to think of it as “priceless.”