Social anxiety disorder (SAD) is one of the most prevalent psychological disorders and generally co-occurs with elevated shame levels. Previous shame-specific interventions could significantly improve outcomes in social anxiety treatments. Recent review suggests that integrating a more direct shame intervention could potentially increase the effectiveness of cognitive behavioral therapy. Web-based cognitive behavioral therapy (WCBT) has proven efficacy, sustaining benefits for 6 months to 4 years. Previous evidence indicated that shame predicted the reduction of social anxiety and mediated between engagements in exposure and changes in social anxiety during WCBT. This study aimed to design a shame intervention component through a longitudinal study and conduct a randomized controlled trial to investigate the effectiveness of a shame intervention component in reducing social anxiety symptoms and shame experience in a clinical sample of people with SAD. The development of a shame intervention component was informed by cognitive behavioral principles and insights from longitudinal data that measured the Experience of Shame Scale (ESS), the Coping Styles Questionnaire, and the Social Interaction Anxiety Scale (SIAS) in 153 participants. The psychoeducation, cognitive construct, and exposure sections were tailored to focus more on shame-related problem-solving and self-blame. A total of 1220 participants were recruited to complete questionnaires, including the ESS, the SIAS, the Social Phobia Scale (SPS), and diagnostic interviews. Following a 2-round screening process, 201 participants with SAD were randomly assigned into a shame WCBT group, a normal WCBT group, and a waiting group. After the 8-week WCBT intervention, the participants were asked to complete posttest evaluations, including the ESS, SIAS and SPS. Participants in the shame WCBT group experienced significant reductions in shame levels after the intervention (ESS: P<.001; ηp2=0.22), and the reduction was greater in the shame intervention group compared to normal WCBT (P<.001; mean deviation -12.50). Participants in both the shame WCBT and normal WCBT groups experienced significant reductions in social anxiety symptoms (SIAS: P<.001; ηp2=0.32; SPS: P<.001; ηp2=0.19) compared to the waiting group after intervention. Furthermore, in the experience of social interaction anxiety (SIAS), the shame WCBT group showed a higher reduction compared to the normal WCBT group (P<.001; mean deviation -9.58). Problem-solving (SE 0.049, 95% CI 0.025-0.217) and self-blame (SE 0.082, 95% CI 0.024-0.339) mediated the effect between ESS and SIAS. This is the first study to design and incorporate a shame intervention component in WCBT and to validate its efficacy via a randomized controlled trial. The shame WCBT group showed a significant reduction in both shame and social anxiety after treatment compared to the normal WCBT and waiting groups. Problem-solving and self-blame mediated the effect of shame on social anxiety. In conclusion, this study supports previous findings that a direct shame-specific intervention component could enhance the efficacy of WCBT.