Heat the oven to 375°F. Cook shells in water with the tablespoon salt until 2 minutes short of the package time, then drain gently and separate.
Brown beef and onion in a skillet for 7 to 8 minutes until the meat reaches 160°F. Drain excess fat and stir in ketchup, mustard, pickles, 1/4 teaspoon salt and pepper; remove from the heat.
Melt butter in a saucepan, whisk in flour and cook for 1 minute. Whisk in milk gradually and simmer for 3 to 4 minutes until lightly thickened, then remove from the heat and stir in 3 oz cheddar and remaining salt.
Spread 1/2 cup cheese sauce in a 9-by-13-inch baking dish. Fill shells with the beef, arrange open-side up, spoon remaining sauce over them and scatter the remaining 2 oz cheddar on top.
Cover and bake for 25 minutes, then uncover for 5 to 8 minutes until hot with the filling at 165°F. Rest for 5 minutes and serve three shells per person.