Breaking the bone of a deceased person is like breaking it while he is alive.
In the Name of Allāh, the Most Merciful…
May His complete Ṣalāt and perfect Salām be upon the Prophet Muḥammad, and upon His companions and followers…
These are a few points of helpful advice that came to my mind as I was discussing the issue of trying to conform to the proper manners of Islamic burials while having to comply to local laws in non-Muslim lands.
In my area, we were required by law to place the deceased into a coffin, and that a simple burial of a shrouded body directly into the ground (which is the Sunnah) was not allowed.
While not pleased in any way with this law, the Muslims in charge of the burial should take the following advice in this case:
Look for a Legal Loophole
1) Ask a lawyer if there are any exceptions allowed and try to find a legal way around it, so that the deceased can be buried properly, in a shroud, directly into the ground. Your area may have slightly different local laws that govern this issue, and it couldn’t hurt to ask.
Buy Only the Cheapest Coffin
2) If there is no legal way around it and it must be done, then the cheapest and easiest thing that fulfills the law should be used. Using a “crate” or another cheap kind of box is sufficient. It should be explained to anyone who may not understand the reason that this is because death is the way that Allāh lowers people and reminds them of how helpless and fragile they will become after death. We are not like the non-Muslims who try to deny the reality of death, hosting parties, giving eulogies, or even stitching fake smiles onto the deceased’s face! We take the reminder, seek forgiveness, lower the deceased into the hole in the ground, and throw the dirt on our lost loved one!
Spending money on expensive caskets or unnecessary burial rituals is taking the wealth of the deceased with no right, and thus taking the wealth of the inheritors with no right, and thus: oppression. Even if someone volunteered to buy an expensive coffin, it would still be a waste of money, since it is of no benefit to the deceased in any way and it is just discarded in the ground.
Fill the Coffin with Dirt Before Finishing the Burial
3) This is extremely important since it is something that many people would not think to do! So long as the law allows (and it should) for an open casket up until the burial is completed, then after placing the deceased into the hole, open the casket and place dirt directly onto the deceased, filling the casket entirely, before closing it and completing the burial.
Why is this important? Because if the casket is not filled up, it will cave in as the weight of the dirt above increases and very likely harm the deceased. We must be very gentle when transporting and burying our dead, so as not to cause them any pain.
The Prophet (may Allāh raise his rank and grant him peace) said:
“Breaking the bone of a deceased person is like breaking it while he is alive.” 
This point (#3) was really why I wanted to write this. I pray that it is a reminder to the believers that is pleasing to Allāh. He alone is the One who grants success.
Please help in passing this on to imāms, community leaders, and those who help often in burials – with my salāms – and Allāh knows best.
 It was collected by Abū Dāwūd (#3207) on the authority of ‘Āʿishah (may Allāh be pleased with her). al-Albānī called it ṣaḥīḥ (authentic).
 Original source: Important Advice for Burying Deceased Muslims in Non-Muslim Lands
Compiled and translated by Shaykh Mūsá Richardson