This is odd to see to those unaware but let me say this. A lot of food that would be perfectly fine is thrown away and if people really need food after everything else if they want to take the risk and maybe swallow a bit of their pride. What this will also go over is another group of people that may be part of the homeless or not and that is the freegan movement.

A burger like this would have been great when I was homeless, it was my entry in the better burger contest.
Freegans come from the words free and vegan and not only stay away from animal products as well as any products that may have been made using sweatshop labor or other circumstance. This group takes that a belief by recognizing that the market driven by a set of morals they find reprehensible. Some may find this bizarre but to them it is the best way to go and as long as it does not hurt them it could very well be just something those outside their vision just may not understand or agree with. In short if you do not like them do not make yourself into a horror story of theirs.
Now, it is not the best way to get food doing this, but when the cards are down it will get you enough calories to get by, maybe while it is still a couple days out for a food bank possibility or of your food stamps kicking in, or of a paycheck. Fast food is has plenty with the small nibbles that people take often being the only part that would be wrong with it.
Granted, I have not done a whole lot of this, but I do know people that did so I am bringing it more from those who I talked to as well as the small parts to add to this article.
Now when you decide to go the timing and place will be important, as you do not want someone to come up behind you pouring a half drained drink over what you just darted your arm in to the can to get easier version of this would be to as they have just buss the table. Separate trash and consumables and just plain trash. If you do this in a fast food area you may have better luck to begin with, but it can be done any place large portions of hot food are being served to customers. When this is done in food cart areas there is more then decent chance that someone will be fishing through the trash eventually.
One reason depending on what state you are in is the bottle deposit. That is a fee based on the container of soda or beer that can be reimbursed by either returning the container to specialty marked facilities or back to the stores, depending on law. Short version on this is you can either get a dime, or a nickel for every container that counts within those areas and if possible is a way to get some funds quickly.
Back to the whole meal sniping if you are just in a fast food area, they sell soda in cups and often no deposit, but that is a factor to help you decide where to go if you need to. From what I have seen you can go longer collecting more food at a good food cart location but it comes with more people digging.
In fast food you need to buy something to often stay there but you can take your time and get used to it and maybe get a refill or two it because it doesn’t have to be a rush when you eat .Pick up something for later and soon feel like you have enough.
Sometimes areas won’t have dumpsters to single areas often behind a simple gate that could be simple enough to get into provided there are no watchful eyes. This kind of works into freeganism because supermarkets will often wont have people watching and especially at night. When checking dumpsters of some other areas there has been a growing step taken by some including some pizza places that before tossing the food out that it would be sprayed or drenched in bleach making the thing unfit for human consumption.
In short as with anything there are risks and rewards so if you need to I hope this helps and if you want more information on the freegan movement link will be below. Get hungry, get full and stay strong.