The only way to know for sure what has happened is to have the vet do a necropsy which is like a human autopsy.
The shaking might have been due to low blood sugar.
Or she might have been so undersized for her age due to a serious health issue such as a heart, liver, or kidney problem. She could have had a viral infection too. The diarrhea may have been from viral infection or from intestinal parasites or bacterial infection.
As the dog became fatally ill within two days of purchase you might be due your money back depending on where you got the dog. It was very likely sold to you while sick particularly if you purchased it at a pet store.
This is very sad for you!
Depending on where you live puppy lemon laws may apply. This site lists some of the states and applicable laws
http://www.malteseonly.com/lemon.html
http://www.consumeraffairs.com/pets/lemon_intro.html
Hope this helps you and I'm so sorry for your loss!
__________________
Please press Accept if you find my answer helpful. Want more info? Just reply on your question!
Bonuses for good work are always appreciated!
Thanks for the opportunity to help you!

