While eggs are cooling cook elbow macaroni according to package directions. Drain and rinse with cold water.
Place the elbow macaroni in a large bowl, slice or chop the eggs and add them to the macaroni, and then mix in the ham, celery, shallots, and lemon juice.
In a small bowl mix together the mayonnaise, mustard, pickle relish, pimentos, salt, and pepper. Mix the dressing into the macaroni mixture and then fold in the shredded cheddar.