I have lots of drugs and I'm wanting to get rid of them

This is not true of all drugs - and, in fact, has not been proven for any drug beyond the legally required testing that formed part of development and stability protocols established by regulatory agencies. Some drugs might be very stable, some might not be, and there is no way to know without testing the drug.

I can assure you that some medications do degrade in time - both loss of potency and development of degradation products that have pharmacological behaviour in humans (aka adverse side effects). My expertise - four years of R&D and quality control stability testing of hundreds of pharmaceutical products.

It is incredibly irresponsible to suggest otherwise.

It is, in Canada and the USA and presumably lots of other jurisdictions, illegal to do this. You cannot pass prescription drugs on to other people, and any shelter should be flat out refusing any offers. Do not do this.

The reason is simple: the only way to know that the drug is what you claim it is is to test it - which is a destructive test rendering the drug unusable.

Even if the package hasn’t been opened, even stuff that pharmacists don’t sell and get returned to manufacturers - once it’s left Quality Control at the manufacturer, it cannot be resold/passed on because the safety of the product is no longer assured.

Pharmaceutical companies dispose of chemical products/left over drugs via incineration - there are companies that specialize in this. Just throw them out - denature them if you want, but just throw them out.
ETA: frankly, the idea that doctors are passing expired drugs of questionable origin on to Africa strikes me as ridiculously unethical. I understand that drugs are very expensive, and there are serious problems that can be helped by these medications, but I’m uncomfortable with thinking that some organizations think it’s ok to pass on potentially unsafe products to the poor.