Discard any razor clams with broken shells before you start. Place the remaining good razor clams in a bowl and cover with cold water. Add the salt and mix in gently to dissolve. Leave them for around 20 - 30 minutes so that they purge and sand and grit. Remove from the water and set aside.
As the clams are soaking, finely chop the shallot/onion and garlic. Roughly chop the parsley.
When ready to cook, warm the oil over a medium-low heat in a pot/pan with a lid that's wide enough to allow the razor clams to be ideally in a single layer, including after expanding a little. Add the shallot/onion and garlic and cook for a minute or two, stirring now and then, to soften slightly - reduce the heat if they start to brown. Add the razor clams, cover with a lid and allow the clams to saute/steam - increase the heat a little if needed. They should only take a couple minutes to open up. After around four minutes, if you have any that still haven't opened, discard them.
Once all of the razor clams have opened, remove them to a serving plate. Drizzle over the garlicy oil mixture and then sprinkle the parsley over the top. Serve immediately.
Notes
½ pound (225g) razor clams is around 6 clams - note you may want to buy slightly more just in case of any loss in cooking. The other ingredients are the same quantity with just slightly more clams, but increase if you make larger quantities. I recommend only making around 1 - 2 portions at a time as if many more, it can be hard to have enough space in the pot/pan for them to evenly heat and expand as the shells open.