Some weapons can be used behind shields even when someone is attacking you. Even in mid attack, if you are hit, you won't get hurt. What is the highest dps weapon that can be used behind a shield? Thank you.
The weapon that inflicts the highest base damage, while being able to attack with your shield up, is the Black Knight Halberd. It can be found in the Shaded Woods as treasure near the third bonfire (Shaded Ruins). It requires 17 strength and 25 dexterity.
It inflicts 213 physical and 90 fire base damage and scales E with Strength, C with Fire and B with Dexterity. Most spears and halberds have a very low scaling, the only one scaling A with Dexterity is Syan's Halberd, most scale C or lower.
Fully upgraded, the Black Knight Halberd does 320 physical and 130 fire damage. I recommend this weapon if your primary "attacking" stat is dexterity and you possibly invested some points into Faith or intelligence for a fire bonus. If you were going more for strength, I recommend the Old Knight Pike, which has a B scaling with Strength and does 340 physical damage fully upgraded. Unlike the Black Knight Halberd, this one doesn't need Twinkling Titanite, so the upgrading components might be easier to acquire, depending on how far you are in the game.
I'm not sure about the following, but Halberds might need more stamina for attacks than Spears. All spears have a generally lower damage rating, but you might have more hits with them. Also, take into account that halberds mostly have a swinging moveset and are slower when attacking normally. You cannot always rely on attacks from behind the shield and should find a weapon that you are comfortable with in other situations too.