Two years ago, on a gray January afternoon, I visited the Ridge Avenue homeless shelter in Philadelphia. I was looking for poor people who had been paid to test experimental drugs. The streets outside the shelter were lined with ruined buildings and razor wire, and a pit bull barked behind a chain-link fence. A young guy was slumped on the curb, glassy-eyed and shaky. My guide, a local mental health activist named Connie Schuster, asked the guy if he was okay, but he didn’t answer. “My guess is heroin,” she said.

We arrived at the shelter, where a security guard was patting down residents for weapons. It didn’t take long for the shelter employees to confirm that some of the people living there were taking part in research studies. They said that the studies are advertised in local newspapers, and that recruiters visit the shelter. “They’ll give you a sheet this big filled with pills,” a resident in the shelter’s day room told me the next day, holding up a large notebook. He had volunteered for two studies. He pointed out a stack of business cards on a desk next to us; they had been left by a local study recruiter. As we spoke, I noticed that an ad for a study of a new ADHD drug was running on a television across the room.

If you’re looking for poor people who have been paid to test experimental drugs, Philadelphia is a good place to start. The city is home to five medical schools, and pharmaceutical and drug-testing companies line a corridor that stretches northeast into New Jersey. It also has one of the most visible homeless populations in the country. In Philly, homeless people seem to be everywhere: sleeping in Love Park, slumped on benches in Suburban Station, or gathered along the Benjamin Franklin Parkway, waiting for the free meals that a local church gives out on Saturdays.

On another occasion, I met former subjects at Chosen 300, a storefront church that serves meals to homeless people. The service had already started by the time I arrived, and raucous gospel music filled the bleak room. The congregation consisted of several dozen black men sitting on folding chairs. Many stared at the floor.

After the service I spoke to a thin young man in a dirty T-shirt who told me he had done an outpatient study for an anxiety drug. “Some kind of new benzo,” he said, as he devoured a bowl of Cheerios. (Benzodiazepines like Valium, Xanax, and Ativan are often prescribed for anxiety.)

Outside, an older man named Steve told me he was trying to get into a depression study. “They ask you a lot of questions and see if you’re approved for it,” he said. “If you’re approved for it they’ll pick you up wherever you’re at.”

Later I walked round the corner to a shelter, where I talked to an elderly white man. “I’d say the majority of guys here take advantage of that,” he told me, “because they get a lot of money and they’re broke as hell.”

Addiction treatment studies are one popular option. Last November, I visited the Sunday Breakfast Association shelter, where I met a man named George. He had a wispy goatee and a Letterman-like gap between his front teeth. George talked with such familiar, ironic congeniality that I was taken aback when he told me he had spent time in prison and once tried to commit suicide. “This city is fucking tough, and it is getting worse,” he said. I mentioned a recruitment flyer I’d seen outside the shelter asking for subjects with “cocaine dependency.” George nodded. He told me that a lot of people start taking drugs just so they can qualify for those studies. “You take that shit two days before to get it into your blood.” He mentioned that he had recently screened for a trial at a research site running addiction studies. “There were people in the waiting room high as a kite,” he said. “They were incoherent.”

But the studies I heard about most often were for psychiatric drugs: antipsychotics, antidepressants, anxiety drugs, and stimulants. George used to take Risperdal, an antipsychotic. “That drug will turn you into a zombie,” he said. He mimed falling over sideways in his chair. “I couldn’t sit up without falling asleep.” He gestured toward the other shelter residents: “Ninety-five percent of the population here has some kind of mental problem.”

Most people think of pharmaceutical research as a highly technical activity that takes place in world-class medical centers. The reality is somewhat different. This is apparent in a grainy video that I watched a few years ago. It had apparently been recorded on a cell phone, and the camerawork started off wobbly. A tanned man wearing sunglasses and a necklace appeared and was introduced as Dr. Johnny Edrozo, a psychiatric researcher. His shirt was unbuttoned partway down his chest. “The latest stimulant coming out of the market is Vyvanse, which is a Dexedrine preparation,” Edrozo told the interviewer, pausing occasionally to chew gum. For reasons that were not explained, the interview took place in a parked car.

This was my introduction to South Coast Clinical Trials, a chain of private research sites in Southern California that specializes in testing psychiatric drugs. Pharmaceutical companies now typically outsource clinical studies to contract research organizations like South Coast, which run trials faster and at lower cost than universities do. Their job is simply to follow the instructions of their sponsors. This formula is working: The contract research industry has grown steadily since the early 1990s and may now generate over $100 billion in annual income, according to the Tufts Center for the Study of Drug Development. At the top of the heap are corporations like Quintiles, which has 28,000 employees and operates in about 100 countries. At the other end are private physicians and small companies like South Coast, which are often based in strip malls or suburban office parks.

Dan Sfera, the owner of South Coast, has produced scores of web videos like this one, the ostensible purpose of which is to demystify drug research. (The unstated purpose, of course, is to generate business for their psychiatric research facilities.) I visited Sfera and his colleague Don Walters not long after watching the video, and they introduced me to a research subject named Steve, who vouched for the good intentions of South Coast clinic staffers. “I love this place,” he said. “It’s awesome. They don’t treat you like you have a mental illness.” A middle-aged man with a short, gray-flecked beard, Steve was starting an outpatient study of Depakote, a seizure drug that is sometimes prescribed for bipolar disorder. He had arrived at the clinic wearing red gym shorts and bedroom slippers. Over the summer, Steve told me, he’d been hospitalized for four weeks and had received eight rounds of electroconvulsive therapy. As he spoke, his hands trembled so violently that he spilled his coffee on the floor. He seemed preoccupied with his roommate, who he said hadn’t showered for weeks. “The man’s got toenails this long,” he said, holding his fingers inches apart.

Steve told me he was staying at a room-and-board, an unlicensed facility where mentally ill people are given a room and meals. At Sfera’s suggestion, I visited one that was home to some South Coast research subjects. It was located in South Central Los Angeles, a bleak neighborhood of chain-link fences and graffiti. The furniture in the house was worn, but a vase of flowers had been placed on the coffee table. Herbert Norman, the house manager, told me that he had 21 residents living there, and that many had been in clinical trials. In fact, Norman was enrolled in a South Coast trial himself. “My diagnosis is bipolar II,” he said, surprising me a little. “Yeah, bipolar with a little bit of schizophrenia.” A broken smoke alarm chirped in the background.

Soon, a very large man in a black Lakers T-shirt lumbered out of a bedroom, giving me a halfhearted fist bump before easing himself onto the couch. He was introduced as Harold. His diagnosis was paranoid schizophrenia, he told me, and he was enrolled in an outpatient study of Abilify, an antipsychotic drug. As we talked, an older black woman kept wandering in and out of the room, her lips smacking and her face twitching. I wanted to find out more about the study Harold was in and whether he understood the risks, but he spoke in a nearly inaudible mumble. “I’m always nervous about taking the pills,” he said. “You kind of feel like a guinea pig all of a sudden.” He said, though, that he had not suffered any side effects. When I asked Harold how much he was being paid, he hesitated and looked around the room, as if he did not want anyone else to hear. Then he asked for a piece of paper and wrote down the number 65.

To find people like Harold, some contract research organizations have employees visit room-and-boards and homeless shelters. In Philadelphia I met a man named Ed Burns, who explained to me how these recruiters work. Burns and his wife had been on the street for over two years when we spoke; he said they had trouble getting space in shelters, even though his wife is pregnant and Burns has bipolar disorder and depression. “I was on Depakote and I almost killed someone out of anger,” he said. “It made me a wrecking machine.” Burns was living in a shelter when he got a message saying that someone from the Veterans Affairs hospital was waiting outside for him. But when he went outside, he said, he was met by a representative of a research company known as CRI Worldwide.

“I was tired, I was hungry, and half an hour earlier the police had treated us like crap,” Burns said. “And this woman is saying, ‘Imagine, in 40 days you’ll have $4,000!’ The recruiter made testing drugs sound like a vacation in a five-star hotel, Burns said. “It’s like a resort selling time shares. They talk about all the benefits first, and it sounds great, but then you start to ask: What do I have to do?”

Not long ago, such offers would have been considered unethical. Paying any volunteer was seen as problematic, even more so if the subjects were poor, uninsured, and compromised by illness. Payment, it was argued, might tempt vulnerable subjects to risk their health. As trials have moved into the private sector, this ethical calculus has changed. First came a hike in the sums that volunteers could be paid: Many clinical trial sites now offer over $6,000 for an inpatient drug study. Eligibility requirements have changed, too. For years, trial sites paid only healthy volunteers, mainly to test new drugs for safety. These days people with asthma, diabetes, kidney disease, liver disease, and other conditions can be paid to take part in trials.