I live in the UK and I am installing some shelves in the cupboard under the stairs and I'm wondering if the material I'm drilling into is dangerous. It is the Party Wall between two houses.
It's possible there is some asbestos in that skim coat over the wall. It's impossible to say but it would be totally unnecessary to have this material tested before hanging shelves.
Asbestos is dangerous when you inhale airborne particles. It's a real hazard in the workplace, where people may inhale asbestos particles for months or years or decades without the proper precautions.
The exposure you have when drilling a few holes to install shelves is very small by comparison. Wear a dust mask when drilling and cleaning up. By all means, refrain from arranging it into lines on a mirror and snorting it.
Keep in mind that the silica dust that you make when drilling masonry - any masonry - can also be harmful. Again the risk with such a limited exposure is small, so it's nothing to get nervous about, but you'll want to take the same precautions against breathing the dust even if there's no asbestos present.
This could be paint, textured wallpaper, plaster, render and blockwork. But it's hard to see from the photo what that brown stuff is - is it hard like render/scratch coat or is it softer?
Depending on the age of the property, any of these could contain asbestos - the most likely culprits being the wallpaper and/or the render/coating (particularly if it's crumbly/fibrous? hard to tell from the photo).
The only way to know for sure is to (carefully, using appropriate precautions) take a sample and send it to a lab for testing. Asbestos testing services for consumers are available at relatively modest cost - search online for asbestos sampling kits.
Another more expensive alternative is to pay for an asbestos survey: a surveyor will come and inspect the whole house and take samples of any suspect materials. If you're planning major work in the future this may be worth doing.
You need to make your own risk/cost decisions. Personally, I would just go ahead if the brown stuff looks like render (i.e. if it's hard/sandy) - but always wear a mask and keep dust down regardless (any kind of dust in the lungs is unhealthy!) If it looks softer or fibrous I would have it tested for sure.