The following is an excerpt from The Revolution Will Not Be Microwaved: Inside America’s Underground Food Movements  by Sandor Ellix Katz . It has been adapted for the Web.
Though cannabis is most often smoked, at least in the United States, it also has a long history of being enjoyed as food. Many regions of the world have developed elaborate culinary traditions for the preparation of cannabis food and drink. Eating cannabis rather than smoking it spares your lungs, though because it metabolizes and takes effect much more slowly, dosage is more difficult to regulate.
Generally the way people cook with cannabis is to extract the THC into butter or oil. THC is oil-soluble, so it can be easily extracted into fats, but not into water. THC is most concentrated in cannabis flower buds, but it is found in lower concentrations throughout the rest of the plant. Cooking with cannabis butter or oil is an ideal way to make use of the leaves and stalks of the plant, after the flower buds have been separated and trimmed for smoking.
A disclaimer: Cooking with cannabis—like any possession or use of the plant—is illegal, except for medically sanctioned purposes in eleven states. The following recipes are intended for legal medical usage and are not encouragement to break the law.
My friend S. — who lives in California, where she uses legal medical cannabis to control her fibromyalgia — makes cannabis snacks for several of the organized cannabis-buying clubs in the Bay Area. S. collects discarded leaves and stalks and cooks them into butter and olive oil, which she incorporates into various delicacies. She uses 1 ½ pounds of leaf for 5 pounds of butter or oil. If you grow your own cannabis or know someone who does, leaves and stalks are inevitable by-products that are abundantly available. If you have only buds available to you, use ¼ to ½ ounce per pound of butter or oil.
The simplest method is direct extraction. First, grind the dry plant material to expose maximum surface area. Then sauté the well-ground plant material in butter or oil, very gently, for an hour or more. After sautéing you can strain out the plant solids and use just the infused butter or oil, or you can allow the butter or oil to remain coarse and leave the cannabis fibers in it. Fiber gives your digestive system a good scrub.
S. uses a more involved method, which I will describe for the adventurous connoisseur. S. has cooked far more cannabis than anyone else I know, and she is emphatic that the best way to extract the THC is by water extraction. This involves slowly and gently cooking the cannabis in butter or oil that is mixed with water. The addition of water enables you to cook the brew longer without any danger of burning, and S. says that it enables a fuller extraction of THC. Be aware that this is a strongly aromatic process which S. does legally—in accordance with state but not federal law—in her urban California neighborhood.
For water extraction, place the plant material in a cooking pot, cover it with water, add the butter or oil, and gently heat on a stovetop. Once the brew begins to bubble at the sides—before it comes to a full boil—lower the heat, insert a heat distributor (a metal plate, often of several layers, that absorbs and spreads the heat) between the burner and the pot, cover the pot, and gently cook. S. recommends cooking for eighteen hours for a full extraction. If this is not practical, cook as long as you can.
As in salad dressing, the oil (or melted butter) will float to the top. When you are done cooking, you need to separate the cannabis oil from the water and spent plant fiber. The easiest way to separate out the plant fibers is to pour the cannabis-oil-water brew through a strainer and squeeze out as much of the liquid as you can. Unfortunately, some of the precious butter remains trapped in the spent plant material. S. says the most effective way of separating out the plant fibers without losing any oil is to fashion something akin to a French coffee press, a porous disc that presses the plant fibers to the bottom of the pot, under the water and out of the oil. Hardware cloth (a steel mesh available in hardware stores) or an aluminum pie plate with holes poked in could be cut to shape for this purpose. Use a spoon or other implement to press the disc down, trapping the plant fibers beneath it, and hold them at the bottom of the pot. Then move the whole pot, with the disc weighted down, to the refrigerator and cool it to congeal the oil or butter. Once the fat is congealed, carefully scoop it out, leaving behind the water and plant material to discard.
Use your butter or oil however you like. Spread it on toast, bake with it, or cook anything you like with it. Use just a little to start, until you gauge the potency and appropriate dosage. In contrast with smoking cannabis, which affects the brain within minutes, your body needs some time to metabolize the THC when you eat cannabis, so it doesn’t take effect as quickly. In the interim, it is sometimes tempting to eat more; be aware that it is easy to eat too much cannabis. An overdose won’t kill you, but it can make you feel disoriented, disabled, and uncomfortable. Start with a small amount, then wait two or three hours to see how it affects you before eating more. Always keep cannabis in a safe place, and clearly marked, to prevent people from unknowingly eating it.