Hi, I am Dr. Peter and would like to help.
1- How long has this been going on?
2- Any vomiting or diarrhea?
The symptoms you describe could be related to (in no particular order):
1- Pain: Very often when dogs are in pain they will pant and shake. The pain could be related to musculoskeletal pain (arthritis, bad back, etc.), abdominal pain (stones, intermittent chronic pancreatitis) etc.
2- Heart disease: Which would be more consistent with the panting if oxygen uptake is decrease by a decrease cardiac output.
3- Fever: Which could be related to an infection.
4- Fear or stress.
I would recommend you consider having him examined by your family veterinarian. If this is related to pain, heart disease or even a fever; all of these conditions are treatable.
If you have additional questions I will be glad to answer them.